Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions client/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import Lobby from 'views/Lobby.jsx'
import Active from 'views/Active.jsx'
import Completed from 'views/Completed.jsx'
import Settings from 'views/Settings.jsx'
import Creator from 'views/Creator.jsx'
import Main from 'components/Main'

// If there isn't a valid token, don't send it. This is because we can have an expired
Expand Down Expand Up @@ -108,6 +109,10 @@ function App() {
path="/active"
component={Active}
></PrivateRoute>
<PrivateRoute
path="/creator"
component={Creator}
></PrivateRoute>
<PrivateRoute
path="/completed"
component={Completed}
Expand All @@ -124,14 +129,6 @@ function App() {
path="/login"
component={Login}
></NonLoggedInRoute>
<Route
path="/:username"
render={(props) => (
<Main>
<Lobby />
</Main>
)}
/>
<Route
path="/"
render={(props) => (
Expand Down
45 changes: 16 additions & 29 deletions client/src/components/Main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const GET_ME_QUERY = gql`
lastName
username
walletBalance
creator
}
}
`
Expand Down Expand Up @@ -98,21 +99,16 @@ const Main = (props) => {
>
Complete
</Dropdown.Item>
{/*
<Dropdown.Item
as={Link}
to={`/${
data && data.me.username
? data.me.username
: 'lobby'
}`}
>
@
{data && data.me.username
? data.me.username
: 'me'}
</Dropdown.Item>
*/}
{isActiveJWT() &&
data &&
data.me.creator && (
<Dropdown.Item
as={Link}
to="/creator"
>
Creator
</Dropdown.Item>
)}
<Dropdown.Item
as={Link}
to="/settings/deposit"
Expand Down Expand Up @@ -170,24 +166,15 @@ const Main = (props) => {
Completed
</Menu.Item>
)}
{/* isActiveJWT() && data && (
{isActiveJWT() && data && data.me.creator && (
<Menu.Item
active={
location.pathname === `/${data.me.username}`
}
active={location.pathname === '/creator'}
as={Link}
to={`/${
data && data.me.username
? data.me.username
: 'lobby'
}`}
to="/creator"
>
@
{data && data.me.username
? data.me.username
: 'me'}
Creator
</Menu.Item>
)*/}
)}

<Menu.Menu position="right">
{isActiveJWT() && (
Expand Down
Loading