Skip to content

Commit a89b95e

Browse files
committed
Force user to log in first with more sidebar item
1 parent d040a78 commit a89b95e

File tree

1 file changed

+5
-7
lines changed
  • packages/app/src/app/pages/Sandbox/Editor/Workspace/items/More

1 file changed

+5
-7
lines changed

packages/app/src/app/pages/Sandbox/Editor/Workspace/items/More/More.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,8 @@ export const More = observer(({ id, message }: Props) => {
1919
editor: { forkSandboxClicked },
2020
} = useSignals();
2121
const {
22-
editor: {
23-
currentSandbox: { owned },
24-
isForkingSandbox,
25-
},
22+
isLoggedIn,
23+
editor: { isForkingSandbox },
2624
} = useStore();
2725

2826
useEffect(() => track('Workspace - More Opened', { id }), [id]);
@@ -32,7 +30,9 @@ export const More = observer(({ id, message }: Props) => {
3230
<Description>{message}</Description>
3331

3432
<Margin margin={1}>
35-
{!owned ? (
33+
{!isLoggedIn ? (
34+
<SignInButton block />
35+
) : (
3636
<ProgressButton
3737
block
3838
loading={isForkingSandbox}
@@ -41,8 +41,6 @@ export const More = observer(({ id, message }: Props) => {
4141
>
4242
{isForkingSandbox ? 'Forking Sandbox...' : 'Fork Sandbox'}
4343
</ProgressButton>
44-
) : (
45-
<SignInButton block />
4644
)}
4745
</Margin>
4846
</div>

0 commit comments

Comments
 (0)