-
Notifications
You must be signed in to change notification settings - Fork 6
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
Jakub Gruber
committed
Oct 1, 2020
1 parent
a54f43c
commit a59ccde
Showing
9 changed files
with
459 additions
and
194 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ | |
# production | ||
/build | ||
/dist | ||
public/build | ||
|
||
# misc | ||
.DS_Store | ||
|
Large diffs are not rendered by default.
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 |
---|---|---|
@@ -1,6 +1,35 @@ | ||
import * as React from "react"; | ||
import {BrowserRouter as Router, Switch, Route, Link} from "react-router-dom"; | ||
|
||
import './styles/App.scss'; | ||
import Home from "./components/Home"; | ||
import Login from "./components/Login" | ||
|
||
const App = () => <div>Hello React App!</div>; | ||
const App = () => { | ||
return ( | ||
<Router> | ||
<div> | ||
<nav> | ||
<ul> | ||
<li> | ||
<Link to="/">Home</Link> | ||
</li> | ||
<li> | ||
<Link to="/login">Login</Link> | ||
</li> | ||
</ul> | ||
</nav> | ||
<Switch> | ||
<Route path="/login"> | ||
<Login/> | ||
</Route> | ||
<Route path="/"> | ||
<Home/> | ||
</Route> | ||
</Switch> | ||
</div> | ||
</Router> | ||
); | ||
} | ||
|
||
export default App; |
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 * as React from "react"; | ||
|
||
const Home = () => { | ||
return (<div>Welcome to home page</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,14 @@ | ||
import * as React from "react"; | ||
|
||
const Login = () => { | ||
return ( | ||
<form method="post"> | ||
<h2>Log in</h2> | ||
<input type="text" className="form-control" placeholder="Username"/> | ||
<input type="password" placeholder="Password"/> | ||
<button type="submit">Log in</button> | ||
</form> | ||
); | ||
} | ||
|
||
export default Login; |
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,18 +1,16 @@ | ||
{ | ||
"compilerOptions": { | ||
// No module system, concatenated file | ||
"module": "none", | ||
|
||
// Set React as the JSX factory | ||
"jsx": "react", | ||
|
||
// Target ES6 for more modern browsers | ||
"target": "es6", | ||
|
||
// Include typings from built-in lib declarations | ||
"lib": ["es2015", "dom", "dom.iterable"], | ||
// Paths mapping and aliasing | ||
// "baseUrl": "./", | ||
// "paths": { | ||
// "@components/*": ["./src/components/*"], | ||
// "@styles/*": ["./src/styles/*"] | ||
// }, | ||
|
||
// Include module source maps for debugging | ||
"sourceMap": true | ||
"lib": ["es2017", "dom", "dom.iterable"] | ||
} | ||
} |
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