Skip to content

Commit

Permalink
Project skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
Gil Teitelbaum committed Sep 8, 2020
1 parent 90e6f01 commit f9e2f92
Show file tree
Hide file tree
Showing 8 changed files with 165 additions and 15 deletions.
96 changes: 96 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"bootstrap": "^4.5.2",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-router-dom": "^5.2.0",
"react-scripts": "3.4.3"
},
"scripts": {
Expand Down
13 changes: 3 additions & 10 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@
text-align: center;
}

.App-header {
background-color: #282c34;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}
.container {
margin-top: 5px;
}
16 changes: 13 additions & 3 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
import React from 'react';
import { Route, Switch, Redirect } from "react-router-dom";
import './App.css';
import Movies from "./components/movies";
import MovieDetails from "./components/movieDetails";
import NotFound from "./components/notFound";

function App() {
return (
<div className="App">
<header className="App-header">

</header>
<main className="container">
<Switch>
<Route path="/movies/:id" component={MovieDetails}></Route>
<Route path="/movies" component={Movies}></Route>
<Route path="/not-found" component={NotFound}></Route>
<Route path="/" component={Movies}></Route>
<Redirect to="not-found"></Redirect>
</Switch>
</main>
</div>
);
}
Expand Down
19 changes: 19 additions & 0 deletions src/components/movieDetails.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React, { Component } from "react";

class MovieDetails extends Component {
constructor(props) {
super(props);
}

render() {
return (
<>

</>
);
}

}

export default MovieDetails;

19 changes: 19 additions & 0 deletions src/components/movies.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React, { Component } from "react";

class Movies extends Component {
constructor(props) {
super(props);
}

render() {
return (
<>
<h1>Movies</h1>
</>
);
}

}

export default Movies;

10 changes: 10 additions & 0 deletions src/components/notFound.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React, { Component } from "react";

class NotFound extends Component {
state = {};
render() {
return <h1>Page Not Found</h1>;
}
}

export default NotFound;
6 changes: 4 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';
import { BrowserRouter } from "react-router-dom";
import "bootstrap/dist/css/bootstrap.css";

ReactDOM.render(
<React.StrictMode>
<BrowserRouter>
<App />
</React.StrictMode>,
</BrowserRouter>,
document.getElementById('root')
);

Expand Down

0 comments on commit f9e2f92

Please sign in to comment.