Skip to content

Commit

Permalink
hide start selling page (#959)
Browse files Browse the repository at this point in the history
  • Loading branch information
levenecav authored Mar 14, 2019
1 parent 2f61ecf commit d014c63
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 37 deletions.
2 changes: 1 addition & 1 deletion src/pages/Errors/404/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Error404 extends PureComponent<PropsType> {
};

handleToMainPage = () => {
this.props.router.replace('/');
window.location = '/';
};

render() {
Expand Down
74 changes: 38 additions & 36 deletions src/routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import { Logout } from 'pages/Logout';
import { StoreOrders, StoreOrder } from 'pages/Manage/Store/Orders';
import { Invoice } from 'pages/Profile/items/Order';
import { Store, StoreAbout, StoreItems, Showcase } from 'pages/Store';
import { StartSelling } from 'pages/StartSelling';
// import { StartSelling } from 'pages/StartSelling';
import { Login } from 'pages/Login';
import { PasswordReset } from 'pages/PasswordReset';
import {
Expand Down Expand Up @@ -391,42 +391,44 @@ const routes = (
/>
</Route>

<Redirect from="/start-selling" to={() => '/start-selling/en'} />
<Route
path="start-selling/:lang"
query={graphql`
query routes_StartSelling_Query {
me {
id
wizardStore {
id
rawId
completed
storeId
{/*
<Redirect from="/start-selling" to={() => '/start-selling/en'} />
<Route
path="start-selling/:lang"
query={graphql`
query routes_StartSelling_Query {
me {
id
wizardStore {
id
rawId
completed
storeId
}
}
}
}
}
`}
Component={StartSelling}
render={({ props, Component }) => {
if (props) {
const { me } = props;
if (
!isNil(me) &&
!isNil(me.wizardStore) &&
me.wizardStore.completed
) {
throw new RedirectException(
`/manage/store/${me.wizardStore.storeId}`,
);
} else {
return <Component />;
}
} else {
return null;
}
}}
/>
`}
Component={StartSelling}
render={({ props, Component }) => {
if (props) {
const { me } = props;
if (
!isNil(me) &&
!isNil(me.wizardStore) &&
me.wizardStore.completed
) {
throw new RedirectException(
`/manage/store/${me.wizardStore.storeId}`,
);
} else {
return <Component />;
}
} else {
return null;
}
}}
/>
*/}

<Route
path="/manage"
Expand Down

0 comments on commit d014c63

Please sign in to comment.