Skip to content

Commit 9d754fe

Browse files
committed
Setup demo Routes
1 parent bfe0f03 commit 9d754fe

File tree

10 files changed

+53
-7
lines changed

10 files changed

+53
-7
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from './Components'

src/Dashboard/Demo/Demo.tsx

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
11
import React from 'react'
2+
import { Switch, Route, RouteComponentProps } from 'react-router-dom'
23

3-
const Demo = () => {
4-
return <div>Demo</div>
4+
import Features from './Features'
5+
import Docs from './Docs'
6+
import Supporters from './Supporters'
7+
import Discuss from './Discuss'
8+
9+
export interface DemoProps extends RouteComponentProps {}
10+
11+
const Demo: React.FC<DemoProps> = ({ match }) => {
12+
return (
13+
<Switch>
14+
<Route path={`${match.url}/features`} component={Features} />
15+
<Route path={`${match.url}/docs`} component={Docs} />
16+
<Route path={`${match.url}/supporters`} component={Supporters} />
17+
<Route path={`${match.url}/discuss`} component={Discuss} />
18+
</Switch>
19+
)
520
}
621

722
export default Demo

src/Dashboard/Demo/Discuss/Discuss.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ const Discuss = () => {
1919

2020
return (
2121
<PageContainer>
22+
<h1>Let&apos;s discuss this!</h1>
2223
<Paper className={classes.content}>
23-
<Typography variant="h4" component="h1">
24+
{/* <Typography variant="h4" component="h1">
2425
Discuss
25-
</Typography>
26+
</Typography> */}
2627
<Disqus.DiscussionEmbed shortname={disqusShortname} config={disqusConfig} />
2728
</Paper>
2829
</PageContainer>

src/Dashboard/Demo/Discuss/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from './Discuss'

src/Dashboard/Demo/Docs/Docs.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ import React from 'react'
33
import PageContainer from '../../_common/BasePageContainer'
44

55
const Docs = () => {
6-
return <PageContainer>Docs</PageContainer>
6+
return (
7+
<PageContainer>
8+
<h1>Docs</h1>
9+
</PageContainer>
10+
)
711
}
812

913
export default Docs

src/Dashboard/Demo/Docs/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from './Docs'

src/Dashboard/Demo/Features/Features.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ import React from 'react'
33
import PageContainer from '../../_common/BasePageContainer'
44

55
const Features = () => {
6-
return <PageContainer>Features!</PageContainer>
6+
return (
7+
<PageContainer>
8+
<h1>Features</h1>
9+
</PageContainer>
10+
)
711
}
812

913
export default Features

src/Dashboard/Demo/Features/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from './Features'

src/Dashboard/Demo/Supporters/Supporters.tsx

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,24 @@ import React from 'react'
33
import PageContainer from '../../_common/BasePageContainer'
44

55
const Supporters = () => {
6-
return <PageContainer>Supporters!</PageContainer>
6+
return (
7+
<PageContainer>
8+
<h1>Supporters</h1>
9+
<div
10+
style={{
11+
marginBottom: '10px',
12+
}}
13+
>
14+
Support me on <strong>Patreon</strong> to release this project faster!
15+
</div>
16+
<a href="https://www.patreon.com/modularcoder">
17+
<img
18+
src="https://c5.patreon.com/external/logo/become_a_patron_button.png"
19+
alt="Support me on patreon"
20+
/>
21+
</a>
22+
</PageContainer>
23+
)
724
}
825

926
export default Supporters
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from './Supporters'

0 commit comments

Comments
 (0)