This commit is contained in:
Maciej Kotowski committed 2021-10-02 17:04:31 +02:00
commit 9e13da998f
10 files changed
+57 -64

No files matched your search

+14 -49
View File
@@ -1,51 +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";
import Hand from "./components/AnimatedHand/Hand.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>
<Logo/>
{/* 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 <Hand/>;
}
function Users() {
return <h2>Users</h2>;
}
};
-13
View File
@@ -1,13 +0,0 @@
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');
.item{
border:1px solid black;
width:70vw;
max-width:500px;
margin:0 auto;
}
.con{
text-align: center;
width:90%;
margin:0 auto;
font-family: 'Poppins', sans-serif;
}
+3 -2
View File
@@ -1,8 +1,9 @@
import React from "react";
import ReactDOM from "react-dom";
import "./index.scss";
import App from "./App.js";
import 'bootstrap/dist/css/bootstrap.min.css';
import { App } from "./App.js";
import "bootstrap/dist/css/bootstrap.min.css";
ReactDOM.render(
<React.StrictMode>
<App />
+2
View File
@@ -2,6 +2,8 @@ $accent: #53d188;
$bggray: #e8e8e8;
$bg: #ffffff;
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap");
* {
margin: 0;
padding: 0;
+6
View File
@@ -0,0 +1,6 @@
// import styles from "./index.module.scss";
import Logo from "../../components/Logo";
export const About = () => {
return <Logo></Logo>;
};
View File
Whitespace-only changes.
+15
View File
@@ -0,0 +1,15 @@
import { Stack } from "react-bootstrap";
import styles from "./index.module.scss";
export const 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>
);
};
+12
View File
@@ -0,0 +1,12 @@
.item {
border: 1px solid black;
width: 70vw;
max-width: 500px;
margin: 0 auto;
}
.con {
text-align: center;
width: 90%;
margin: 0 auto;
font-family: "Poppins", sans-serif;
}
+5
View File
@@ -0,0 +1,5 @@
// import styles from './index.module.scss';
export const Users = () => {
return <h2>Users</h2>;
};
View File
Whitespace-only changes.