Skip to content

Commit

Permalink
Fix header flag
Browse files Browse the repository at this point in the history
  • Loading branch information
benjackwhite committed Oct 13, 2023
1 parent 0973ab9 commit 37dbb8a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion frontend/src/models/notebooksModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export const notebooksModel = kea<notebooksModelType>([
query: {
kind: NodeKind.InsightVizNode,
source: node,
} as InsightVizNode,
},
},
]
}, [] as { title: string; query: InsightVizNode | Node }[])
Expand Down
17 changes: 10 additions & 7 deletions frontend/src/scenes/dashboard/DashboardHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import { tagsModel } from '~/models/tagsModel'
import { DashboardTemplateEditor } from './DashboardTemplateEditor'
import { dashboardTemplateEditorLogic } from './dashboardTemplateEditorLogic'
import { notebooksModel } from '~/models/notebooksModel'
import { FlaggedFeature } from 'lib/components/FlaggedFeature'

export const DASHBOARD_CANNOT_EDIT_MESSAGE =
"You don't have edit permissions for this dashboard. Ask a dashboard collaborator with edit access to add you."
Expand Down Expand Up @@ -263,13 +264,15 @@ export function DashboardHeader(): JSX.Element | null {
>
Duplicate dashboard
</LemonButton>
<LemonButton
onClick={() => createNotebookFromDashboard(dashboard)}
status="stealth"
fullWidth
>
Create notebook from dashboard
</LemonButton>
<FlaggedFeature flag={'notebooks'}>
<LemonButton
onClick={() => createNotebookFromDashboard(dashboard)}
status="stealth"
fullWidth
>
Create notebook from dashboard
</LemonButton>
</FlaggedFeature>
{canEditDashboard && (
<LemonButton
onClick={() => {
Expand Down

0 comments on commit 37dbb8a

Please sign in to comment.