Skip to content

Commit 730f663

Browse files
author
Gene Hynson
authored
fix: share button only on saved notebooks (#2930)
1 parent 2f6c088 commit 730f663

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

src/flows/components/header/index.tsx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -199,16 +199,18 @@ const FlowHeader: FC = () => {
199199
<PresentationMode />
200200
<TimeZoneDropdown />
201201
<TimeRangeDropdown />
202-
<FeatureFlag name="shareNotebook">
203-
<SquareButton
204-
icon={IconFont.Share}
205-
onClick={showShare}
206-
color={
207-
!share ? ComponentColor.Default : ComponentColor.Secondary
208-
}
209-
titleText="Share Notebook"
210-
/>
211-
</FeatureFlag>
202+
{flow?.id && (
203+
<FeatureFlag name="shareNotebook">
204+
<SquareButton
205+
icon={IconFont.Share}
206+
onClick={showShare}
207+
color={
208+
!share ? ComponentColor.Default : ComponentColor.Secondary
209+
}
210+
titleText="Share Notebook"
211+
/>
212+
</FeatureFlag>
213+
)}
212214
<FeatureFlag name="flow-snapshot">
213215
<SquareButton
214216
icon={IconFont.Export}

0 commit comments

Comments
 (0)