New folder structure

This commit is contained in:
mmacierzanka committed 2021-10-02 17:01:14 +02:00
1 parent 6abb6530bd
commit ec8acf1568
10 files changed
+57 -62

No files matched your search

+14 -47
View File
@@ -1,49 +1,16 @@
import styles from "./App.module.scss";
import {
BrowserRouter as Router,
Switch,
Route,
Link
} from "react-router-dom";
import Stack from 'react-bootstrap/Stack'
import Container from 'react-bootstrap/Container'
import Logo from "./components/Logo/index.js";
export default function App() {
import { BrowserRouter as Router, Switch, Route /*Link*/ } from "react-router-dom";
import { Home } from "./pages/Home";
import { About } from "./pages/About";
import { Users } from "./pages/Users";
export const App = () => {
return (
<Router>
<div>
{/* A <Switch> looks through its children <Route>s and
renders the first one that matches the current URL. */}
<Switch>
<Route path="/about">
<About />
</Route>
<Route path="/users">
<Users />
</Route>
<Route path="/">
<Home />
</Route>
</Switch>
</div>
</Router>
<Router>
<Switch>
<Route path="/about" component={About} />
<Route path="/users" component={Users} />
<Route path="/" component={Home} />
</Switch>
</Router>
);
}
function Home() {
return (
<div className={styles.con}> <Stack gap={1}>
<div className={styles.item}>First item</div>
<div className={styles.item}>Second item</div>
<div className={styles.item}>Third item</div>
</Stack></div>
);
}
function About() {
return <Logo/>;
}
function Users() {
return <h2>Users</h2>;
}
};