Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start adding registration and authentication features to dashboard
- Loading branch information
1 parent
8904548
commit be5b74c
Showing
20 changed files
with
2,547 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ "extends": "../.eslintrc" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
mutation CreateItem($storeId: ID!, $input: ItemInput!) { | ||
createItem(storeId: $storeId, input: $input) { | ||
_id | ||
name | ||
pricePerUnit | ||
featured | ||
unit | ||
} | ||
} | ||
|
||
query StoreItems($storeId: ID!) { | ||
storeItems(storeId: $storeId) { | ||
_id | ||
name | ||
pricePerUnit | ||
featured | ||
unit | ||
} | ||
} | ||
|
||
query Items { | ||
items { | ||
_id | ||
name | ||
pricePerUnit | ||
featured | ||
unit | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
mutation CreateManager($storeId: ID!, $input: ManagerInput) { | ||
createManager(storeId: $storeId, input: $input) { | ||
_id | ||
name | ||
role | ||
} | ||
} | ||
|
||
query StoreManagers($storeId: ID!) { | ||
storeManagers(storeId: $storeId) { | ||
_id | ||
name | ||
role | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
mutation CreateStore($input: StoreInput) { | ||
createStore(input: $input) { | ||
_id | ||
name | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
import { BrowserRouter, Switch, Route } from 'react-router-dom'; | ||
|
||
import Home from './pages/Home'; | ||
import Orders from './pages/Orders'; | ||
import Items from './pages/Items'; | ||
|
||
import Sidebar from './components/Sidebar'; | ||
import { Provider, createClient } from 'urql'; | ||
|
||
const AppContainer = styled.div` | ||
display: flex; | ||
align-items: stretch; | ||
height: 100vh; | ||
`; | ||
|
||
const MainContainer = styled.main` | ||
flex-grow: 1; | ||
`; | ||
|
||
const client = createClient({ | ||
url: 'http://localhost:5000' | ||
}); | ||
|
||
const App = () => { | ||
return ( | ||
<Provider value={client}> | ||
<BrowserRouter> | ||
<AppContainer> | ||
<Sidebar /> | ||
<MainContainer> | ||
<Switch> | ||
<Route exact path='/' component={Home} /> | ||
<Route exact path='/orders' component={Orders} /> | ||
<Route exact path='/items' component={Items} /> | ||
</Switch> | ||
</MainContainer> | ||
</AppContainer> | ||
</BrowserRouter> | ||
</Provider> | ||
); | ||
}; | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
|
||
const PageBackground = styled.main` | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100%; | ||
width: 100%; | ||
background-color: #efefef; | ||
`; | ||
|
||
const OnboardingContainer = styled.div` | ||
border-radius: 6px; | ||
box-shadow: 0 1px 3px hsla(0, 0%, 0.2); | ||
padding: 20px; | ||
`; | ||
|
||
const Onboarding = () => { | ||
return ( | ||
<PageBackground> | ||
<OnboardingContainer>Onboarding</OnboardingContainer> | ||
</PageBackground> | ||
); | ||
}; | ||
|
||
export default Onboarding; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/// <reference types="react-scripts" /> |
Oops, something went wrong.