Skip to content

Commit 48b65c7

Browse files
committed
Enable stackbit for non signed in users with login button
1 parent b789366 commit 48b65c7

File tree

1 file changed

+27
-23
lines changed
  • packages/app/src/app/components/CreateNewSandbox/CreateSandbox/Import

1 file changed

+27
-23
lines changed

packages/app/src/app/components/CreateNewSandbox/CreateSandbox/Import/Import.tsx

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
} from '@codesandbox/common/lib/utils/url-generator';
77
import { Button } from '@codesandbox/common/lib/components/Button';
88
import { useOvermind } from 'app/overmind';
9+
import { SignInButton } from 'app/pages/common/SignInButton';
910
import { TerminalIcon } from '../Icons/TerminalIcon';
1011
import { DownloadIcon } from '../Icons/DownloadIcon';
1112
import { GitHubIcon, StackbitIcon } from '../Icons';
@@ -129,33 +130,36 @@ export const Import = () => {
129130
</ButtonContainer>
130131
</form>
131132
</Column>
132-
{state.user && (
133-
<>
134-
<VerticalSeparator />
135-
<Column>
136-
<FeatureName>
137-
<StackbitIcon style={{ marginRight: '1rem' }} />
138-
Import from Stackbit
139-
</FeatureName>
140-
<FeatureText>
141-
Create a project using{' '}
142-
<a
143-
href="https://www.stackbit.com/"
144-
target="_blank"
145-
rel="noreferrer noopener"
146-
>
147-
Stackbit
148-
</a>
149-
. This generates a project for you that{"'"}s automatically set
150-
up with any Theme, Site Generator and CMS.
151-
</FeatureText>
133+
134+
<>
135+
<VerticalSeparator />
136+
<Column>
137+
<FeatureName>
138+
<StackbitIcon style={{ marginRight: '1rem' }} />
139+
Import from Stackbit
140+
</FeatureName>
141+
<FeatureText>
142+
Create a project using{' '}
143+
<a
144+
href="https://www.stackbit.com/"
145+
target="_blank"
146+
rel="noreferrer noopener"
147+
>
148+
Stackbit
149+
</a>
150+
. This generates a project for you that{"'"}s automatically set up
151+
with any Theme, Site Generator and CMS.
152+
</FeatureText>
153+
{!state.user ? (
154+
<SignInButton />
155+
) : (
152156
<StackbitButton
153157
style={{ fontSize: 11 }}
154158
username={state.user.username}
155159
/>
156-
</Column>
157-
</>
158-
)}
160+
)}
161+
</Column>
162+
</>
159163
</Features>
160164
<ImportChoices>
161165
<a href="/docs/importing#export-with-cli">

0 commit comments

Comments
 (0)