do Appbar, Drawer, ExtensionCard

This commit is contained in:
Aria Moradi
2020-12-24 15:02:03 +03:30
parent 33c08c0b79
commit 4f595d1166
10 changed files with 461 additions and 56 deletions

View File

@@ -5,39 +5,28 @@ import {
Route,
Link
} from "react-router-dom";
import Button from '@material-ui/core/Button';
import TemporaryDrawer from "./components/TemporaryDrawer";
import NavBar from "./components/NavBar";
export default function App() {
return (
<Router>
<div>
<nav>
<ul>
<li>
<Link to="/">Home</Link>
</li>
<li>
<Link to="/extensions">Extensions</Link>
</li>
<li>
<Link to="/users">Users</Link>
</li>
</ul>
</nav>
{/*<TemporaryDrawer/>*/}
<NavBar/>
{/* A <Switch> looks through its children <Route>s and
renders the first one that matches the current URL. */}
<Switch>
<Route path="/extensions">
<Extensions/>
</Route>
<Route path="/users">
<Users/>
</Route>
<Route path="/">
<Home/>
</Route>
</Switch>
</div>
<Switch>
<Route path="/extensions">
<Extensions/>
</Route>
<Route path="/users">
<Users/>
</Route>
<Route path="/">
<Home/>
</Route>
</Switch>
</Router>
);
}
@@ -59,7 +48,11 @@ function Extensions() {
}
function Home() {
return <h2>Home</h2>;
return (
<Button variant="contained" color="primary">
Hello World
</Button>
)
}
function Users() {