forked from ONEST-Network/ref-seeker-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue ONEST-Network#12 feat: Added Routing
- Loading branch information
1 parent
5e7628b
commit 0af8884
Showing
6 changed files
with
99 additions
and
17 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,6 @@ | ||
|
||
const About = () => { | ||
return <div>About</div> | ||
} | ||
|
||
export default About |
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 @@ | ||
|
||
const Home = () => { | ||
return <div>Home</div> | ||
} | ||
|
||
export default Home |
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,32 @@ | ||
import Home from "./components/Home"; | ||
import About from "./components/About"; | ||
|
||
export const pageRoutes = { | ||
HOME: "/", | ||
ABOUT: "/about" | ||
}; | ||
|
||
interface Route { | ||
key: string; | ||
title: string; | ||
path: string; | ||
enabled: boolean; | ||
component: React.FC<{}>; | ||
} | ||
|
||
export const routes: Route[] = [ | ||
{ | ||
key: "home-route", | ||
title: "HomePage", | ||
path: "/", | ||
enabled: true, | ||
component: Home, | ||
}, | ||
{ | ||
key: "about-route", | ||
title: "About", | ||
path: "/About", | ||
enabled: true, | ||
component: About, | ||
} | ||
]; |