Skip to content

Commit a921771

Browse files
author
Ives van Hoorne
committed
Make all links to homepage have query
1 parent fe43a11 commit a921771

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

packages/app/src/app/pages/CLI/Prompt/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function Prompt({ error, token, loading, username, signIn }) {
1515
<Title>An error occured:</Title>
1616
<SubTitle>{error}</SubTitle>
1717
<Buttons>
18-
<Button href="/">Go to homepage</Button>
18+
<Button href="/?from-app=1">Go to homepage</Button>
1919
</Buttons>
2020
</Container>
2121
);

packages/app/src/app/pages/Sandbox/Editor/Header/Logo/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import LogoIcon from 'common/components/Logo';
55
import { Container, Title } from './elements';
66

77
export default () => (
8-
<Container id="logo" href="/">
8+
<Container id="logo" href="/?from-app=1">
99
<div style={{ position: 'relative', display: 'flex' }}>
1010
<LogoIcon title="CodeSandbox" width={30} height={30} />
1111
</div>

packages/app/src/app/pages/common/Navigation/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function Navigation({ signals, store, title }) {
3030
return (
3131
<Row justifyContent="space-between">
3232
<Row>
33-
<a href="/">
33+
<a href="/?from-app=1">
3434
<LogoWithBorder height={40} width={40} />
3535
</a>
3636
<Border width={1} size={500} />
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
import React from 'react';
22

3+
import { inject } from 'mobx-react';
34
import SubTitle from 'app/components/SubTitle';
45
import Button from 'app/components/Button';
56
import { newSandboxWizard } from 'common/utils/url-generator';
67

78
import { Container, Title, Buttons } from './elements';
89

9-
function NotFound() {
10+
function NotFound({ store }) {
11+
const { hasLogIn } = store;
12+
1013
return (
1114
<Container>
1215
<Title>404</Title>
@@ -16,10 +19,11 @@ function NotFound() {
1619
Create Sandbox
1720
</Button>
1821
<Button small block style={{ margin: '.5rem' }} href="/">
19-
To Homepage
22+
To {hasLogIn ? 'Dashboard' : 'Homepage'}
2023
</Button>
2124
</Buttons>
2225
</Container>
2326
);
2427
}
25-
export default NotFound;
28+
29+
export default inject('store')(NotFound);

packages/homepage/src/components/Navigation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export default class Navigation extends React.PureComponent {
127127
<MaxWidth width={1280}>
128128
<Container>
129129
<Left>
130-
<Link to="/">
130+
<Link to="/?from-app=1">
131131
<StyledLogo title="CodeSandbox" width={50} height={50} />
132132
</Link>
133133
</Left>

0 commit comments

Comments
 (0)