Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

https://master--musical-florentine-5987b8.netlify.app/ #316

Open
wants to merge 32 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
f39a8e3
start
EmiliaGA Mar 27, 2023
abaa401
added two components
EmiliaGA Mar 27, 2023
d3491fd
function init
edv-rd Mar 27, 2023
acadc4a
Changed components
EmiliaGA Mar 28, 2023
2bd1269
trying to fetch
EmiliaGA Mar 28, 2023
7c07973
wip
edv-rd Mar 28, 2023
fe5cf29
config fix
edv-rd Mar 28, 2023
c5409ff
fixed react-install
EmiliaGA Mar 28, 2023
ee8a171
bugs bugs bugs
EmiliaGA Mar 28, 2023
b64c9cf
styling
EmiliaGA Mar 28, 2023
40e8ef6
styling for mobile and larger
edv-rd Mar 28, 2023
ec4c810
merge with details
edv-rd Mar 29, 2023
a676731
branch init
edv-rd Mar 29, 2023
77a3e75
basic functionality and styling
edv-rd Mar 29, 2023
2a5d8ea
updated styling
edv-rd Mar 30, 2023
51a4e10
file cleanup
edv-rd Mar 30, 2023
2544397
rounded movie rating number
edv-rd Mar 30, 2023
8671f4a
added loader and header
EmiliaGA Mar 31, 2023
7c0c6fe
styling header and loader
EmiliaGA Mar 31, 2023
9d638d5
read me
EmiliaGA Apr 1, 2023
fee29e8
made header into link
EmiliaGA Apr 1, 2023
a3af7dd
added spinning popcorn, felt important
EmiliaGA Apr 1, 2023
8d0a548
added a page-not-found
EmiliaGA Apr 1, 2023
7dcd346
saturday dump
EmiliaGA Apr 1, 2023
faea117
final styling for button
edv-rd Apr 1, 2023
8ffbef0
fixed styling even better
edv-rd Apr 1, 2023
8969aa4
...
EmiliaGA Apr 2, 2023
d4a9a19
merged back-button
edv-rd Apr 2, 2023
ee94b00
added loader to details
edv-rd Apr 2, 2023
54ce53e
bugs
EmiliaGA Apr 2, 2023
1ecd2d3
read-me, added link to deployed page
EmiliaGA Apr 2, 2023
7bbeecb
netlify 404 fix?
edv-rd Apr 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
# Project Movies

Replace this readme with your own information about your project.
This pair-programming project was to make a react app with multiple pages using routes.

Start by briefly describing the assignment in a sentence or two. Keep it short and to the point.
✓ Pair-programming

✓ How to build multi-page applications using React Router.

✓ How to pass information such as product ids, or blog post titles in the URL and pick this up in React router to load dynamic content.

✓ Practice using APIs in React - combining `useState` with `useEffect`

## The problem

Describe how you approached to problem, and what tools and techniques you used to solve it. How did you plan? What technologies did you use? If you had more time, what would be next?
We layed out the foundation together planning what was to be done, then branched out making different components. Merging a couple of times then using pair programming getting the components mounted and working toghether. We managed to add a few stretch goals (back button, header and loader). If we had more time we would also add categorys to the header fetching them from the API.

## View it live

Every project should be deployed somewhere. Be sure to include the link to the deployed project so that the viewer can click around and see what it's all about.
https://master--musical-florentine-5987b8.netlify.app/

140 changes: 139 additions & 1 deletion code/package-lock.json

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

6 changes: 5 additions & 1 deletion code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@
"private": true,
"dependencies": {
"@babel/eslint-parser": "^7.18.9",
"@fortawesome/fontawesome-svg-core": "^6.4.0",
"@fortawesome/free-solid-svg-icons": "^6.4.0",
"@fortawesome/react-fontawesome": "^0.2.0",
"eslint": "^8.21.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-react": "^7.30.1",
"eslint-plugin-react-hooks": "^4.6.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react-dom": "^18.2.0",
"react-router-dom": "^6.9.0"
},
"scripts": {
"start": "react-scripts start",
Expand Down
1 change: 1 addition & 0 deletions code/public/assets/arrow-left-solid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions code/public/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
Expand All @@ -14,6 +13,10 @@
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>Technigo React App</title>
<script
src="https://kit.fontawesome.com/3f7fe28938.js"
crossorigin="anonymous"
></script>
</head>

<body>
Expand All @@ -30,5 +33,4 @@
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>

</html>
40 changes: 36 additions & 4 deletions code/src/App.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,41 @@
import React from 'react';
import React, { useState, useEffect } from 'react';
import { BrowserRouter, Route, Routes, Navigate } from 'react-router-dom';

import { Loader } from 'components/Loader';
import { Header } from 'components/Header'
import { MovieList } from 'components/MovieList';
import { Details } from 'components/Details'
import { NotFound } from 'components/NotFound'

export const App = () => {
const [movieList, setMovieList] = useState([]);
const [loading, setLoading] = useState(false);

useEffect(() => {
setLoading(true);
fetch('https://api.themoviedb.org/3/movie/popular?api_key=c78445f7216324dcfc408149681f2fcd&language=en-US&page=1')
.then((data) => data.json())
.then((configuredData) => {
setMovieList(configuredData.results);
})
.catch((error) => console.error(error))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice that you kept this in the code!

.finally(() => setLoading(false));
}, []);
if (loading) {
return (
<Loader />
)
}
return (
<div>
Find me in src/app.js!
</div>
<BrowserRouter>
<Header />
<Routes>
<Route path="/" element={<MovieList movieList={movieList} />} />
<Route path="/404" element={<NotFound />} />
<Route path="/*" element={<Navigate to="/404" replace />} />

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does the "replace" thing do? I think i missed that in my code 😯

<Route path="/details/:movieId" element={<Details details={Details} />} />
</Routes>
</BrowserRouter>
);
}

71 changes: 71 additions & 0 deletions code/src/components/Details.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
.details-page {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job using separate .css files for each component. Basically styled components right 😄👍🏼

display: flex;
flex-direction: column;
}

.detail-background-picture {
min-height: 100vh;
background-size: cover;
}

.details {
display: flex;
flex-direction: column;
justify-content: flex-end;
}

.movie-data-cover {
height: 290px;
width: 195px;
border: 5px solid white;
}

.detail-container {
display: flex;
flex-direction: column;
background-color: #1313139e;
padding: 50px;
}

.movie-data-section {
display: flex;
flex-direction: column;
}

.movie-data-title {
color: white;
text-shadow: 1px 1px #4d4d4d;
}

.movie-data-rating {
display: inline-block;
background-color: white;
padding: 0 5px;
font-size: 20px;
text-shadow: none;
font-weight: 500;
color: black;
}

.movie-data-overview {
color: white;
max-width: 400px;
}

@media (min-width: 769px) {
.detail-container {
justify-content: flex-end;
}

.movie-data-section {
flex-direction: row;
bottom: 20px;
gap: 20px;
align-items: flex-end;
}

.movie-data-cover {
width: auto;
height: 400px;
}
}
Loading