Skip to content

Commit ae2350e

Browse files
committed
🐛 Only display export flow option if user is not guest
Closes baptisteArno#1118
1 parent 5c3c7c2 commit ae2350e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

apps/builder/src/features/editor/components/BoardMenuButton.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import { useRouter } from 'next/router'
2626

2727
export const BoardMenuButton = (props: FlexProps) => {
2828
const { query } = useRouter()
29-
const { typebot } = useTypebot()
29+
const { typebot, currentUserMode } = useTypebot()
3030
const { user } = useUser()
3131
const [isDownloading, setIsDownloading] = useState(false)
3232
const { isOpen, onOpen, onClose } = useDisclosure()
@@ -78,9 +78,11 @@ export const BoardMenuButton = (props: FlexProps) => {
7878
<MenuItem icon={<SettingsIcon />} onClick={onOpen}>
7979
{t('editor.graph.menu.editorSettingsItem.label')}
8080
</MenuItem>
81-
<MenuItem icon={<DownloadIcon />} onClick={downloadFlow}>
82-
{t('editor.graph.menu.exportFlowItem.label')}
83-
</MenuItem>
81+
{currentUserMode !== 'guest' ? (
82+
<MenuItem icon={<DownloadIcon />} onClick={downloadFlow}>
83+
{t('editor.graph.menu.exportFlowItem.label')}
84+
</MenuItem>
85+
) : null}
8486
</MenuList>
8587
<EditorSettingsModal isOpen={isOpen} onClose={onClose} />
8688
</Menu>

0 commit comments

Comments
 (0)