-
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.
- Loading branch information
1 parent
8d0a75f
commit 2197983
Showing
14 changed files
with
207 additions
and
11 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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -1,10 +1,35 @@ | ||
import React from 'react' | ||
import ReactDOM from 'react-dom/client' | ||
import App from './App.tsx' | ||
import './index.css' | ||
import React from "react" | ||
import ReactDOM from "react-dom/client" | ||
import { createBrowserRouter, RouterProvider } from "react-router-dom" | ||
import "./index.css" | ||
import Bugs from "./routes/Bugs" | ||
import Root from "./routes/root" | ||
import Blockchain from "./routes/Blockchain" | ||
import User from "./routes/User" | ||
|
||
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render( | ||
const router = createBrowserRouter([ | ||
{ | ||
path: "/", | ||
element: <Root />, | ||
children: [ | ||
{ | ||
element: <Blockchain />, | ||
index: true, | ||
}, | ||
{ | ||
path: "user", | ||
element: <User />, | ||
}, | ||
{ | ||
path: "bugs", | ||
element: <Bugs />, | ||
}, | ||
], | ||
}, | ||
]) | ||
|
||
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render( | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode>, | ||
<RouterProvider router={router} /> | ||
</React.StrictMode> | ||
) |
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,7 @@ | ||
import React from "react" | ||
|
||
const Blockchain = () => { | ||
return <div>Blockchain</div> | ||
} | ||
|
||
export default Blockchain |
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,5 @@ | ||
const Bugs = () => { | ||
return <div>hello i am bugs page</div> | ||
} | ||
|
||
export default Bugs |
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,56 @@ | ||
import { Outlet, Link } from "react-router-dom" | ||
import logo from "../assets/fil-plus.svg" | ||
import blockchain from "../assets/blockchain.svg" | ||
import bug from "../assets/bug.svg" | ||
import user from "../assets/user.svg" | ||
|
||
const navigationItems = [ | ||
{ | ||
name: "Blockchain", | ||
to: "", | ||
svg: blockchain, | ||
}, | ||
{ | ||
name: "User", | ||
to: "user", | ||
svg: user, | ||
}, | ||
{ | ||
name: "Bugs", | ||
to: "bugs", | ||
svg: bug, | ||
}, | ||
] | ||
|
||
function Root() { | ||
return ( | ||
<section className="flex"> | ||
<nav className="w-64 min-h-screen shadow-md"> | ||
<img | ||
src={logo} | ||
alt="logo" | ||
className="h-16 w-full cursor-pointer my-4" | ||
/> | ||
<div className="flex flex-col px-6"> | ||
{navigationItems.map((item) => { | ||
return ( | ||
<Link | ||
to={item.to} | ||
className="flex h-6 items-center w-full space-x-4 py-6 cursor-pointer" | ||
> | ||
<img src={item.svg} alt="blockchain" className="h-6" /> | ||
<span>{item.name}</span> | ||
</Link> | ||
) | ||
})} | ||
</div> | ||
</nav> | ||
|
||
<main className="bg-[#E7E7E7] flex-1"> | ||
<Outlet /> | ||
</main> | ||
</section> | ||
) | ||
} | ||
|
||
export default Root |
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,7 @@ | ||
import React from "react" | ||
|
||
const User = () => { | ||
return <div>User</div> | ||
} | ||
|
||
export default User |