+
{list.map((movie) => (
-
-
-
{movie.title}
-
Released {movie.release_date}
+
+
+
{movie.title}
+
Released {movie.release_date}
-
-
- ))}
+
+
+ ))}
)
From 5d126dc18a7ac143a6c1f356ebd3d79df154b251 Mon Sep 17 00:00:00 2001
From: Andrea
Date: Thu, 30 Mar 2023 10:44:40 +0200
Subject: [PATCH 11/33] added display flex in CSS
---
code/src/Components/MovieList.js | 1 -
code/src/index.css | 6 ++++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/code/src/Components/MovieList.js b/code/src/Components/MovieList.js
index e384f2ef2..41f36a1f8 100644
--- a/code/src/Components/MovieList.js
+++ b/code/src/Components/MovieList.js
@@ -38,5 +38,4 @@ const MoviesList = () => {
)
}
-
export default MoviesList;
\ No newline at end of file
diff --git a/code/src/index.css b/code/src/index.css
index 4a1df4db7..6b77865fc 100644
--- a/code/src/index.css
+++ b/code/src/index.css
@@ -11,3 +11,9 @@ code {
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
monospace;
}
+
+.movie-container {
+ display: flex;
+ flex-wrap: wrap;
+
+}
\ No newline at end of file
From 390b578d693a20a3a282f7096bdee9b8bd623255 Mon Sep 17 00:00:00 2001
From: Andrea
Date: Thu, 30 Mar 2023 10:56:14 +0200
Subject: [PATCH 12/33] added some styling
---
code/src/index.css | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/code/src/index.css b/code/src/index.css
index 6b77865fc..9b7b95be3 100644
--- a/code/src/index.css
+++ b/code/src/index.css
@@ -16,4 +16,16 @@ code {
display: flex;
flex-wrap: wrap;
+}
+
+.movie-container a {
+ width: 100%;
+ position: relative;
+ text-decoration: none;
+
+
+}
+
+.movie-wrapper img {
+ width: 97%;
}
\ No newline at end of file
From 3b7e8a86cfe04f3224794253840fca1873b06eb8 Mon Sep 17 00:00:00 2001
From: Andrea
Date: Thu, 30 Mar 2023 10:59:46 +0200
Subject: [PATCH 13/33] changed img width
---
code/src/index.css | 4 ----
1 file changed, 4 deletions(-)
diff --git a/code/src/index.css b/code/src/index.css
index 9b7b95be3..9fa6d8c74 100644
--- a/code/src/index.css
+++ b/code/src/index.css
@@ -25,7 +25,3 @@ code {
}
-
-.movie-wrapper img {
- width: 97%;
-}
\ No newline at end of file
From bc64bfc51095ee167c710d0bb198b01ec6307619 Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Fri, 31 Mar 2023 09:29:59 +0200
Subject: [PATCH 14/33] css
---
code/public/index.html | 4 +---
code/src/index.css | 34 +++++++++++++++++++++++++++-------
2 files changed, 28 insertions(+), 10 deletions(-)
diff --git a/code/public/index.html b/code/public/index.html
index e6730aa66..219322c13 100644
--- a/code/public/index.html
+++ b/code/public/index.html
@@ -1,6 +1,5 @@
-
@@ -13,7 +12,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
- Technigo React App
+ 🍿🎥 Popular Movies
@@ -30,5 +29,4 @@
To create a production bundle, use `npm run build` or `yarn build`.
-->
-
diff --git a/code/src/index.css b/code/src/index.css
index 9fa6d8c74..3414dbd73 100644
--- a/code/src/index.css
+++ b/code/src/index.css
@@ -5,23 +5,43 @@ body {
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
+ background: black;
+ color: white;
+ overflow-x: hidden;
}
-
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
monospace;
}
+*{
+ box-sizing: border-box;
+}
-.movie-container {
- display: flex;
- flex-wrap: wrap;
-}
+.movie-container {
+ display: grid;
+ grid-template-columns: 1fr;
+}
.movie-container a {
- width: 100%;
position: relative;
text-decoration: none;
+}
+.movie-wrapper img {
+ width: 100%;
+}
-}
+/* DESKTOP */
+@media (min-width: 1024px) {
+ .movie-container{
+ display: grid;
+ grid-template-columns: 1fr 1fr 1fr 1fr;
+ }
+ }
+ /* TABLET */
+ @media (min-width: 668px) and (max-width: 1024px){
+ .movie-container{
+ grid-template-columns: 1fr 1fr 1fr;
+ }
+ }
\ No newline at end of file
From 0c9792a4f30c1ed35f9b0daf3d61a408ec14668d Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Fri, 31 Mar 2023 11:07:01 +0200
Subject: [PATCH 15/33] .
---
code/src/index.css | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/src/index.css b/code/src/index.css
index 3414dbd73..1d4267a59 100644
--- a/code/src/index.css
+++ b/code/src/index.css
@@ -21,7 +21,7 @@ code {
.movie-container {
display: grid;
- grid-template-columns: 1fr;
+ grid-template-columns: 1fr 1fr;
}
.movie-container a {
position: relative;
From adba81370d6836cdef44e57ed7614e08b377db8a Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Fri, 31 Mar 2023 15:11:33 +0200
Subject: [PATCH 16/33] styled the page, added a backbutton
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Co-authored-by: Andrea Hedström
---
code/public/favicon.ico | Bin 0 -> 15406 bytes
code/public/favicoon.ico | 1 +
code/public/index.html | 2 +-
code/src/Components/Intro.js | 12 +++
code/src/Components/MovieDetails.js | 42 +++++---
code/src/Components/MovieList.js | 6 ++
code/src/index.css | 154 +++++++++++++++++++++++++++-
7 files changed, 197 insertions(+), 20 deletions(-)
create mode 100644 code/public/favicon.ico
create mode 100644 code/public/favicoon.ico
create mode 100644 code/src/Components/Intro.js
diff --git a/code/public/favicon.ico b/code/public/favicon.ico
new file mode 100644
index 0000000000000000000000000000000000000000..7a5ef16be324916b2c7806deab1431ed9a706e19
GIT binary patch
literal 15406
zcmeHO33OD|86JzarL9$}wF|b=9&53-5DWnXL~vmX0Rp78P;dcMM9_dD$l@3h6d{1Z
zQAEJ)pasDN2}uYL2x}nA5P@XoO)@h{$Yc)!0Rxi1-#3$+c?^-sgoL5zIOqK5zIXro
z|KE4l_wM`e7!21KS{ZJ<(SWp_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{;VB5xu|w
literal 0
HcmV?d00001
diff --git a/code/public/favicoon.ico b/code/public/favicoon.ico
new file mode 100644
index 000000000..0fb31f21b
--- /dev/null
+++ b/code/public/favicoon.ico
@@ -0,0 +1 @@
+
diff --git a/code/public/index.html b/code/public/index.html
index 219322c13..631c9b834 100644
--- a/code/public/index.html
+++ b/code/public/index.html
@@ -12,7 +12,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
- 🍿🎥 Popular Movies
+ Popular Movies
diff --git a/code/src/Components/Intro.js b/code/src/Components/Intro.js
new file mode 100644
index 000000000..98bcfe46c
--- /dev/null
+++ b/code/src/Components/Intro.js
@@ -0,0 +1,12 @@
+import React from 'react'
+
+const Spinning = () => (
+
+)
+
+export default Spinning
diff --git a/code/src/Components/MovieDetails.js b/code/src/Components/MovieDetails.js
index bb006f2c7..7bc28022c 100644
--- a/code/src/Components/MovieDetails.js
+++ b/code/src/Components/MovieDetails.js
@@ -1,12 +1,13 @@
+/* eslint-disable jsx-a11y/no-static-element-interactions */
import React, { useState, useEffect } from 'react'
import { useParams, useNavigate } from 'react-router-dom'
import NotFound from 'components/NotFound'
+/* PAGE 2 */
const MovieDetails = () => {
const [details, setDetails] = useState([]);
const navigate = useNavigate();
const { id } = useParams()
-
const onBackButtonClick = () => {
navigate(-1);
}
@@ -23,28 +24,39 @@ const MovieDetails = () => {
}
})
}
-
+ // eslint-disable-next-line no-unused-vars
+ const handleBackButton = (event) => {
+ if (event.KeyCode === 13) {
+ onBackButtonClick();
+ }
+ };
useEffect(() => {
FetchDetails()
})
return (
-
-
-
-
-
-
{details.title}
+
+
+
+
+
+
+
+
{details.title}
{details.overview}
-
+
);
}
diff --git a/code/src/Components/MovieList.js b/code/src/Components/MovieList.js
index 41f36a1f8..3da6c9cd2 100644
--- a/code/src/Components/MovieList.js
+++ b/code/src/Components/MovieList.js
@@ -1,9 +1,12 @@
/* eslint-disable no-shadow */
import React, { useState, useEffect } from 'react';
import { Link } from 'react-router-dom';
+import Spinning from './Intro';
+/* STARTPAGE */
const MoviesList = () => {
const [list, setList] = useState([]);
+ const [loading, setLoading] = useState(false);
/* Fetch function that allows us to get the movie titles, images from API */
const FetchMovies = () => {
@@ -16,6 +19,8 @@ const MoviesList = () => {
/* A call back function - this useEffect hook awakens the FetchMovies function above */
useEffect(() => {
FetchMovies()
+ setLoading(true);
+ setTimeout(() => setLoading(false), 1500)
}, [])
/* This return shows the img, titles, rdate & the id on our HTML page */
@@ -34,6 +39,7 @@ const MoviesList = () => {
))}
+ {loading && (
)}
)
}
diff --git a/code/src/index.css b/code/src/index.css
index 1d4267a59..283e39f7f 100644
--- a/code/src/index.css
+++ b/code/src/index.css
@@ -16,9 +16,7 @@ code {
*{
box-sizing: border-box;
}
-
-
-
+/* PAGE 1 */
.movie-container {
display: grid;
grid-template-columns: 1fr 1fr;
@@ -30,7 +28,123 @@ code {
.movie-wrapper img {
width: 100%;
}
+.movie-wrapper:hover .details{
+ visibility: visible;
+}
+
+/* H1 & P film info*/
+.details {
+ color: #fff;
+ visibility: hidden;
+ font-size: 20px;
+ left: 0;
+ bottom: 0;
+ margin: 10px;
+ position: absolute;
+ right: 0;
+ text-decoration: none;
+}
+
+.details:hover h1,
+.details:hover p {
+color: #fff;
+}
+.movie-wrapper {
+position: relative;
+}
+.movie-wrapper:hover img{
+ -webkit-filter: brightness(50%);
+ filter: brightness(50%);
+}
+
+/* .movie-container:hover {
+background-color: rgba(0, 0, 0, 0.442);
+} */
+
+
+/* DETAILS-PAGE */
+
+.background {
+ min-height: 100vh;
+ background-repeat: no-repeat;
+ background-size: cover;
+ background-position: center;
+}
+
+.movie-details {
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ margin-left: 15px;
+ padding-top: 15px;
+}
+
+.movie-details img {
+ border: solid white 1px;
+
+}
+
+.details-page-2 {
+ background-color: rgba(0, 0, 0, 0.585);
+ max-width: 370px;
+ margin: 17px;
+
+}
+
+.details-page-2 h3 {
+ font-size: 23px;
+ margin-bottom: -5px;
+ padding: 2px;
+
+}
+
+.details-page-2 p {
+ margin-bottom: 20px;
+}
+
+/* THE BACK BUTTON */
+/* mobile */
+.button {
+ position: absolute;
+ left: 21%;
+ top: 7%;
+ transform: translate(-50%, -50%);
+ transform: rotate(90deg);
+ cursor: pointer;
+}
+
+.button span {
+ display: block;
+ width: 4.5vw;
+ height: 4.5vw;
+ border-bottom: 5px solid white;
+ border-right: 5px solid white;
+ transform: rotate(45deg);
+ margin: -10px;
+ animation: animate 2s infinite;
+}
+
+.button span:nth-child(2) {
+ animation-delay: -0.2s;
+}
+.button span:nth-child(3) {
+ animation-delay: -0.4s;
+}
+
+@keyframes animate {
+ 0% {
+ opacity: 0;
+ transform: rotate(45deg) translate(-20px, -20px);
+ }
+ 50% {
+ opacity: 1;
+ }
+ 100% {
+ opacity: 0;
+ transform: rotate(45deg) translate(20px, 20px);
+ }
+}
/* DESKTOP */
@media (min-width: 1024px) {
@@ -38,10 +152,42 @@ code {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
}
+ .button {
+ position: absolute;
+ left: 7%;
+ top: 7%;
}
+ .button span {
+ display: block;
+ width: 1.5vw;
+ height: 1.5vw;
+ border-bottom: 5px solid white;
+ border-right: 5px solid white;
+ transform: rotate(45deg);
+ margin: -10px;
+ animation: animate 2s infinite;
+}
+
+
/* TABLET */
@media (min-width: 668px) and (max-width: 1024px){
.movie-container{
grid-template-columns: 1fr 1fr 1fr;
}
- }
\ No newline at end of file
+ .button {
+ position: absolute;
+ left: 12%;
+ top: 2%;
+ }
+ .button span {
+ display: block;
+ width: 2.5vw;
+ height: 2.5vw;
+ border-bottom: 5px solid rgb(213, 69, 69);
+ border-right: 5px solid rgb(185, 34, 34);
+ transform: rotate(45deg);
+ margin: -10px;
+ animation: animate 2s infinite;
+ }
+ }
+}
\ No newline at end of file
From 17f62fbc9c90fd003e43485b565eb40384fc6571 Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Fri, 31 Mar 2023 15:28:21 +0200
Subject: [PATCH 17/33] fixed back button
---
code/src/index.css | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/code/src/index.css b/code/src/index.css
index 283e39f7f..921f6facf 100644
--- a/code/src/index.css
+++ b/code/src/index.css
@@ -146,6 +146,10 @@ background-color: rgba(0, 0, 0, 0.442);
}
}
+
+
+
+
/* DESKTOP */
@media (min-width: 1024px) {
.movie-container{
@@ -167,27 +171,26 @@ background-color: rgba(0, 0, 0, 0.442);
margin: -10px;
animation: animate 2s infinite;
}
-
+}
/* TABLET */
- @media (min-width: 668px) and (max-width: 1024px){
+ @media (min-width: 667px) and (max-width: 1024px){
.movie-container{
grid-template-columns: 1fr 1fr 1fr;
}
.button {
position: absolute;
- left: 12%;
+ left: 10%;
top: 2%;
}
.button span {
display: block;
- width: 2.5vw;
- height: 2.5vw;
- border-bottom: 5px solid rgb(213, 69, 69);
- border-right: 5px solid rgb(185, 34, 34);
+ width: 3.5vw;
+ height: 3.5vw;
+ border-bottom: 5px solid rgb(255, 255, 255);
+ border-right: 5px solid rgb(255, 255, 255);
transform: rotate(45deg);
margin: -10px;
animation: animate 2s infinite;
}
- }
-}
\ No newline at end of file
+ }
\ No newline at end of file
From fdb1ce20d1b75df6e548b727e145f8738278d4af Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Fri, 31 Mar 2023 18:18:12 +0200
Subject: [PATCH 18/33] fixed some stuff :)
---
code/src/Components/MovieDetails.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/code/src/Components/MovieDetails.js b/code/src/Components/MovieDetails.js
index 7bc28022c..036c114d8 100644
--- a/code/src/Components/MovieDetails.js
+++ b/code/src/Components/MovieDetails.js
@@ -1,3 +1,4 @@
+/* eslint-disable jsx-a11y/click-events-have-key-events */
/* eslint-disable jsx-a11y/no-static-element-interactions */
import React, { useState, useEffect } from 'react'
import { useParams, useNavigate } from 'react-router-dom'
From d5bb1ad4f8cbfb8c6c81ee6a1ecda4c95cd8a07b Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Fri, 31 Mar 2023 18:18:24 +0200
Subject: [PATCH 19/33] <
---
code/src/App.js | 2 +-
code/src/Components/Intro.js | 8 +--
code/src/Components/MovieList.js | 6 +-
code/src/index.css | 101 +++++++++++++++++++++++++------
4 files changed, 92 insertions(+), 25 deletions(-)
diff --git a/code/src/App.js b/code/src/App.js
index 0bb51975a..b2631030a 100644
--- a/code/src/App.js
+++ b/code/src/App.js
@@ -11,7 +11,7 @@ export const App = () => {
} />
} />
} />
-
} />
+
} />
);
diff --git a/code/src/Components/Intro.js b/code/src/Components/Intro.js
index 98bcfe46c..ac804616b 100644
--- a/code/src/Components/Intro.js
+++ b/code/src/Components/Intro.js
@@ -1,12 +1,12 @@
import React from 'react'
-const Spinning = () => (
+const Popcorn = () => (
- 🍿
+
+
-
HELLO AAAAAA
)
-export default Spinning
+export default Popcorn
diff --git a/code/src/Components/MovieList.js b/code/src/Components/MovieList.js
index 3da6c9cd2..05ea09ffb 100644
--- a/code/src/Components/MovieList.js
+++ b/code/src/Components/MovieList.js
@@ -1,7 +1,7 @@
/* eslint-disable no-shadow */
import React, { useState, useEffect } from 'react';
import { Link } from 'react-router-dom';
-import Spinning from './Intro';
+import Popcorn from './Intro';
/* STARTPAGE */
const MoviesList = () => {
@@ -20,7 +20,7 @@ const MoviesList = () => {
useEffect(() => {
FetchMovies()
setLoading(true);
- setTimeout(() => setLoading(false), 1500)
+ setTimeout(() => setLoading(false), 2500)
}, [])
/* This return shows the img, titles, rdate & the id on our HTML page */
@@ -39,7 +39,7 @@ const MoviesList = () => {
))}
- {loading && ()}
+ {loading && ()}
)
}
diff --git a/code/src/index.css b/code/src/index.css
index 921f6facf..f55d6cb77 100644
--- a/code/src/index.css
+++ b/code/src/index.css
@@ -44,7 +44,6 @@ code {
right: 0;
text-decoration: none;
}
-
.details:hover h1,
.details:hover p {
color: #fff;
@@ -63,12 +62,13 @@ background-color: rgba(0, 0, 0, 0.442);
/* DETAILS-PAGE */
-
.background {
min-height: 100vh;
background-repeat: no-repeat;
background-size: cover;
background-position: center;
+ display: flex;
+ flex-direction: column;
}
.movie-details {
@@ -78,32 +78,70 @@ background-color: rgba(0, 0, 0, 0.442);
margin-left: 15px;
padding-top: 15px;
}
-
.movie-details img {
border: solid white 1px;
-
}
.details-page-2 {
background-color: rgba(0, 0, 0, 0.585);
- max-width: 370px;
+ max-width: 410px;
margin: 17px;
-
+ max-height: 210px;
+ top: 520px;
+ transition: .2s ease-in-out;
}
-
+ .details-page-2:hover {
+ transition: 0.35s ease-in-out;
+ transform: scale(1.4);
+ }
.details-page-2 h3 {
font-size: 23px;
margin-bottom: -5px;
padding: 2px;
-
}
-
.details-page-2 p {
margin-bottom: 20px;
}
+
+
+/* LOADING */
+.loading-movies {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ height: 100vh;
+}
+.loading-movies p {
+ font-size: 30px;
+ text-align: center;
+ margin: 15px;
+}
+.loading-intro {
+ animation-name: loadintro;
+ display: block;
+ width: 90px;
+ height: 80px;
+ font-size: 80px;
+ margin-bottom: 20px;
+ animation-duration: 800ms;
+ animation-iteration-count: infinite;
+ animation-timing-function: linear;
+}
+@keyframes loadspinning {
+from {
+ transform: rotate(0deg)
+ }
+to {
+ transform: rotate(360deg)
+ }
+}
+
+
+
+
/* THE BACK BUTTON */
-/* mobile */
.button {
position: absolute;
left: 21%;
@@ -112,7 +150,6 @@ background-color: rgba(0, 0, 0, 0.442);
transform: rotate(90deg);
cursor: pointer;
}
-
.button span {
display: block;
width: 4.5vw;
@@ -123,15 +160,12 @@ background-color: rgba(0, 0, 0, 0.442);
margin: -10px;
animation: animate 2s infinite;
}
-
.button span:nth-child(2) {
animation-delay: -0.2s;
}
-
.button span:nth-child(3) {
animation-delay: -0.4s;
}
-
@keyframes animate {
0% {
opacity: 0;
@@ -148,8 +182,6 @@ background-color: rgba(0, 0, 0, 0.442);
-
-
/* DESKTOP */
@media (min-width: 1024px) {
.movie-container{
@@ -171,6 +203,23 @@ background-color: rgba(0, 0, 0, 0.442);
margin: -10px;
animation: animate 2s infinite;
}
+.background {
+ min-height: 100vh;
+ background-repeat: no-repeat;
+ background-size: cover;
+ background-position: center;
+ display: flex;
+ flex-direction: row;
+}
+.details-page-2 {
+ background-color: rgba(0, 0, 0, 0.585);
+ max-width: 410px;
+ margin: 17px;
+ max-height: 210px;
+ position: absolute;
+ left: 360px;
+ top: 300px;
+ }
}
/* TABLET */
@@ -193,4 +242,22 @@ background-color: rgba(0, 0, 0, 0.442);
margin: -10px;
animation: animate 2s infinite;
}
- }
\ No newline at end of file
+ .background {
+ min-height: 100vh;
+ background-repeat: no-repeat;
+ background-size: cover;
+ background-position: center;
+ display: flex;
+ flex-direction: row;
+ }
+ .details-page-2 {
+ background-color: rgba(0, 0, 0, 0.585);
+ max-width: 410px;
+ margin: 17px;
+ max-height: 210px;
+ top: 520px;
+ position: absolute;
+ right: 18px;
+ top: 308px;
+ }
+ }
\ No newline at end of file
From c697c227ccc8d9c625351dcd0ee28753bd4512b0 Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Fri, 31 Mar 2023 18:37:07 +0200
Subject: [PATCH 20/33] intro
---
code/src/Components/Intro.js | 1 +
code/src/Components/MovieList.js | 4 ++--
code/src/index.css | 29 ++++++++++-------------------
3 files changed, 13 insertions(+), 21 deletions(-)
diff --git a/code/src/Components/Intro.js b/code/src/Components/Intro.js
index ac804616b..f32d11ec0 100644
--- a/code/src/Components/Intro.js
+++ b/code/src/Components/Intro.js
@@ -5,6 +5,7 @@ const Popcorn = () => (
+ bajs
)
diff --git a/code/src/Components/MovieList.js b/code/src/Components/MovieList.js
index 05ea09ffb..489f5c7c7 100644
--- a/code/src/Components/MovieList.js
+++ b/code/src/Components/MovieList.js
@@ -20,12 +20,13 @@ const MoviesList = () => {
useEffect(() => {
FetchMovies()
setLoading(true);
- setTimeout(() => setLoading(false), 2500)
+ setTimeout(() => setLoading(false), 2000)
}, [])
/* This return shows the img, titles, rdate & the id on our HTML page */
return (
+ {loading && ()}
{list.map((movie) => (
@@ -39,7 +40,6 @@ const MoviesList = () => {
))}
- {loading && ()}
)
}
diff --git a/code/src/index.css b/code/src/index.css
index f55d6cb77..a7bfe2f6b 100644
--- a/code/src/index.css
+++ b/code/src/index.css
@@ -107,40 +107,31 @@ background-color: rgba(0, 0, 0, 0.442);
/* LOADING */
.loading-movies {
- display: flex;
- flex-direction: column;
justify-content: center;
align-items: center;
- height: 100vh;
+ height: 1000vh;
}
.loading-movies p {
- font-size: 30px;
text-align: center;
margin: 15px;
+
}
.loading-intro {
animation-name: loadintro;
- display: block;
- width: 90px;
- height: 80px;
- font-size: 80px;
margin-bottom: 20px;
- animation-duration: 800ms;
- animation-iteration-count: infinite;
- animation-timing-function: linear;
+ text-align: center;
+ justify-self: center;
+ display: flex;
+ font-size: 50px;
+
}
-@keyframes loadspinning {
-from {
- transform: rotate(0deg)
- }
-to {
- transform: rotate(360deg)
- }
+/* INTRO PICTURE POPCORN MAN*/
+.loading-intro img {
+ width: 500px;
}
-
/* THE BACK BUTTON */
.button {
position: absolute;
From b60f68d82e8a324e8e4a694189a8a1a3b7eddb0a Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Sat, 1 Apr 2023 08:31:50 +0200
Subject: [PATCH 21/33] loading intro
---
code/src/Components/Intro.js | 4 ++--
code/src/index.css | 10 +++++++++-
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/code/src/Components/Intro.js b/code/src/Components/Intro.js
index f32d11ec0..9fcd919c8 100644
--- a/code/src/Components/Intro.js
+++ b/code/src/Components/Intro.js
@@ -4,8 +4,8 @@ const Popcorn = () => (
-
- bajs
+
+ Get your snacks ready
)
diff --git a/code/src/index.css b/code/src/index.css
index a7bfe2f6b..ab67fc00c 100644
--- a/code/src/index.css
+++ b/code/src/index.css
@@ -123,12 +123,20 @@ background-color: rgba(0, 0, 0, 0.442);
justify-self: center;
display: flex;
font-size: 50px;
-
+ flex-direction: column;
+ padding: 40px;
+ padding-top: 100px;
}
/* INTRO PICTURE POPCORN MAN*/
.loading-intro img {
width: 500px;
}
+.center {
+ display: block;
+ margin-left: auto;
+ margin-right: auto;
+}
+
From 39441e5d6f7879fd6f005db7a9d0803c6623da33 Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Sat, 1 Apr 2023 09:27:26 +0200
Subject: [PATCH 22/33] change cursor, styling, intro
---
code/src/App.js | 2 ++
code/src/Components/Header.js | 12 ++++++++++++
code/src/index.css | 24 +++++++++++++++---------
3 files changed, 29 insertions(+), 9 deletions(-)
create mode 100644 code/src/Components/Header.js
diff --git a/code/src/App.js b/code/src/App.js
index b2631030a..118d5f467 100644
--- a/code/src/App.js
+++ b/code/src/App.js
@@ -13,7 +13,9 @@ export const App = () => {
} />
} />
+
+
);
}
diff --git a/code/src/Components/Header.js b/code/src/Components/Header.js
new file mode 100644
index 000000000..62b6685cf
--- /dev/null
+++ b/code/src/Components/Header.js
@@ -0,0 +1,12 @@
+import React from 'react'
+
+const header = () => {
+ return (
+
+
HELLO
+
+
+ )
+}
+
+export default header;
\ No newline at end of file
diff --git a/code/src/index.css b/code/src/index.css
index ab67fc00c..73ab34591 100644
--- a/code/src/index.css
+++ b/code/src/index.css
@@ -8,6 +8,9 @@ body {
background: black;
color: white;
overflow-x: hidden;
+ cursor: url("data:image/svg+xml;utf8,
")
+ 16 0,
+auto;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
@@ -54,12 +57,11 @@ position: relative;
.movie-wrapper:hover img{
-webkit-filter: brightness(50%);
filter: brightness(50%);
+ cursor: url("data:image/svg+xml;utf8,
")
+ 16 0,
+auto;
}
-/* .movie-container:hover {
-background-color: rgba(0, 0, 0, 0.442);
-} */
-
/* DETAILS-PAGE */
.background {
@@ -104,17 +106,17 @@ background-color: rgba(0, 0, 0, 0.442);
}
-
/* LOADING */
.loading-movies {
justify-content: center;
align-items: center;
- height: 1000vh;
+ height:auto;
+ height: 100vh;
+ overflow:auto;
}
.loading-movies p {
text-align: center;
margin: 15px;
-
}
.loading-intro {
animation-name: loadintro;
@@ -138,8 +140,6 @@ background-color: rgba(0, 0, 0, 0.442);
}
-
-
/* THE BACK BUTTON */
.button {
position: absolute;
@@ -158,12 +158,18 @@ background-color: rgba(0, 0, 0, 0.442);
transform: rotate(45deg);
margin: -10px;
animation: animate 2s infinite;
+ cursor: pointer;
+
}
.button span:nth-child(2) {
animation-delay: -0.2s;
+ cursor: pointer;
+
}
.button span:nth-child(3) {
animation-delay: -0.4s;
+ cursor: pointer;
+
}
@keyframes animate {
0% {
From 7b1ca6482455f0406b712b51c0bd02fed2e42ab0 Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Sat, 1 Apr 2023 10:07:57 +0200
Subject: [PATCH 23/33] drop down menu + header
---
code/src/App.js | 2 +-
code/src/Components/Header.js | 17 ++++++----
code/src/Components/MovieList.js | 3 +-
code/src/index.css | 55 +++++++++++++++++++++++++++++++-
4 files changed, 68 insertions(+), 9 deletions(-)
diff --git a/code/src/App.js b/code/src/App.js
index 118d5f467..789ab9ee2 100644
--- a/code/src/App.js
+++ b/code/src/App.js
@@ -3,6 +3,7 @@ import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom'
import MovieList from 'components/MovieList'
import MovieDetails from 'components/MovieDetails'
import NotFound from 'components/NotFound'
+/* import { Header } from 'components/Header' */
export const App = () => {
return (
@@ -13,7 +14,6 @@ export const App = () => {
} />
} />
-
);
diff --git a/code/src/Components/Header.js b/code/src/Components/Header.js
index 62b6685cf..64d09e387 100644
--- a/code/src/Components/Header.js
+++ b/code/src/Components/Header.js
@@ -1,12 +1,17 @@
import React from 'react'
-const header = () => {
+const Header = () => {
return (
-
-
HELLO
-
+
)
}
-
-export default header;
\ No newline at end of file
+export default Header;
\ No newline at end of file
diff --git a/code/src/Components/MovieList.js b/code/src/Components/MovieList.js
index 489f5c7c7..194554513 100644
--- a/code/src/Components/MovieList.js
+++ b/code/src/Components/MovieList.js
@@ -2,7 +2,7 @@
import React, { useState, useEffect } from 'react';
import { Link } from 'react-router-dom';
import Popcorn from './Intro';
-
+import Header from './Header';
/* STARTPAGE */
const MoviesList = () => {
const [list, setList] = useState([]);
@@ -27,6 +27,7 @@ const MoviesList = () => {
return (
{loading && ()}
+
{list.map((movie) => (
diff --git a/code/src/index.css b/code/src/index.css
index 73ab34591..ba6800c89 100644
--- a/code/src/index.css
+++ b/code/src/index.css
@@ -19,6 +19,18 @@ code {
*{
box-sizing: border-box;
}
+
+
+header {
+ padding: 30px;
+ background-color: white;
+}
+header h6 {
+ color: black;
+}
+
+
+
/* PAGE 1 */
.movie-container {
display: grid;
@@ -114,7 +126,7 @@ auto;
height: 100vh;
overflow:auto;
}
-.loading-movies p {
+.loading-movies {
text-align: center;
margin: 15px;
}
@@ -187,6 +199,47 @@ auto;
+
+/* DROPDOWN MENU */
+/* the menu button */
+.dropbtn {
+ background-color: orange;
+ color: white;
+ padding: 16px;
+ font-size: 16px;
+ border: none;
+}
+.dropdown {
+ position: relative;
+ display: inline-block;
+}
+.dropdown-content {
+ display: none;
+ position: absolute;
+ background-color: #f1f1f1;
+ min-width: 160px;
+ box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
+ z-index: 1;
+}
+/* inside font color */
+.dropdown-content a {
+ color: black;
+ padding: 12px 16px;
+ text-decoration: none;
+ display: block;
+}
+
+/* dropdown list hover color pink */
+.dropdown-content a:hover {background-color: pink;}
+.dropdown:hover .dropdown-content {display: block;}
+/* hover color over button blue */
+.dropdown:hover .dropbtn {background-color: blue;}
+
+
+
+
+
+
/* DESKTOP */
@media (min-width: 1024px) {
.movie-container{
From 058a4b605406a684df72f5ce0728da3a93b3215f Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Sat, 1 Apr 2023 10:18:56 +0200
Subject: [PATCH 24/33] .
---
code/src/Components/Header.js | 2 +-
code/src/index.css | 25 +++++++++++++++----------
2 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/code/src/Components/Header.js b/code/src/Components/Header.js
index 64d09e387..0b22e1508 100644
--- a/code/src/Components/Header.js
+++ b/code/src/Components/Header.js
@@ -6,9 +6,9 @@ const Header = () => {
diff --git a/code/src/index.css b/code/src/index.css
index ba6800c89..a5b93d4b5 100644
--- a/code/src/index.css
+++ b/code/src/index.css
@@ -21,12 +21,10 @@ code {
}
-header {
+.header-container {
padding: 30px;
- background-color: white;
-}
-header h6 {
- color: black;
+ background-color: #4c0000;
+
}
@@ -202,6 +200,13 @@ auto;
/* DROPDOWN MENU */
/* the menu button */
+button {
+ background: none;
+ padding: 16px;
+ font-size: 20px;
+ border: none;
+ color: white;
+}
.dropbtn {
background-color: orange;
color: white;
@@ -216,24 +221,24 @@ auto;
.dropdown-content {
display: none;
position: absolute;
- background-color: #f1f1f1;
+ background-color: #0b0b0b;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
/* inside font color */
.dropdown-content a {
- color: black;
+ color: rgb(243, 243, 243);
padding: 12px 16px;
text-decoration: none;
display: block;
}
/* dropdown list hover color pink */
-.dropdown-content a:hover {background-color: pink;}
+.dropdown-content a:hover {background-color: rgb(159, 159, 159);}
.dropdown:hover .dropdown-content {display: block;}
-/* hover color over button blue */
-.dropdown:hover .dropbtn {background-color: blue;}
+/* hover color over button */
+/*.dropdown:hover .dropbtn {background-color: blue;} */
From 0b48994dc0ceed5ded7e56eb5d389b384e503165 Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Sat, 1 Apr 2023 11:22:03 +0200
Subject: [PATCH 25/33] netlify fix
---
code/public/_redirects | 1 +
code/src/index.css | 11 +++++++----
2 files changed, 8 insertions(+), 4 deletions(-)
create mode 100644 code/public/_redirects
diff --git a/code/public/_redirects b/code/public/_redirects
new file mode 100644
index 000000000..50a463356
--- /dev/null
+++ b/code/public/_redirects
@@ -0,0 +1 @@
+/* /index.html 200
\ No newline at end of file
diff --git a/code/src/index.css b/code/src/index.css
index a5b93d4b5..aacbf573e 100644
--- a/code/src/index.css
+++ b/code/src/index.css
@@ -20,15 +20,15 @@ code {
box-sizing: border-box;
}
-
.header-container {
- padding: 30px;
+ padding: 10px;
background-color: #4c0000;
-
+ cursor: url("data:image/svg+xml;utf8,")
+ 16 0,
+auto;
}
-
/* PAGE 1 */
.movie-container {
display: grid;
@@ -206,6 +206,9 @@ button {
font-size: 20px;
border: none;
color: white;
+ cursor: url("data:image/svg+xml;utf8,")
+ 16 0,
+auto;
}
.dropbtn {
background-color: orange;
From 3aff207e4dbdaa53a0f12fe73404abd51aff54c8 Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Sat, 1 Apr 2023 22:16:08 +0200
Subject: [PATCH 26/33] fixed rating, the dropdown menu does not work yet
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Co-authored-by: Andrea Hedström
---
code/src/App.js | 2 +-
code/src/Components/MovieList.js | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/code/src/App.js b/code/src/App.js
index 789ab9ee2..c82d3ab44 100644
--- a/code/src/App.js
+++ b/code/src/App.js
@@ -3,7 +3,6 @@ import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom'
import MovieList from 'components/MovieList'
import MovieDetails from 'components/MovieDetails'
import NotFound from 'components/NotFound'
-/* import { Header } from 'components/Header' */
export const App = () => {
return (
@@ -19,6 +18,7 @@ export const App = () => {
);
}
+export default App;
/* BrowserRouter= Wrapper for everything / main wrapper for the whole wrap */
/* Route= Wrapper for every component */
/* Route path= Path to a single component */
diff --git a/code/src/Components/MovieList.js b/code/src/Components/MovieList.js
index 194554513..13e6b3f13 100644
--- a/code/src/Components/MovieList.js
+++ b/code/src/Components/MovieList.js
@@ -27,7 +27,7 @@ const MoviesList = () => {
return (
{loading && ()}
-
+
{list.map((movie) => (
From 5100863cfc17aad998afb8792c7203f4fa7ab8ac Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Sat, 1 Apr 2023 22:16:30 +0200
Subject: [PATCH 27/33] .
---
code/src/Components/Header.js | 16 ++++++++++++++--
code/src/Components/MovieDetails.js | 2 +-
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/code/src/Components/Header.js b/code/src/Components/Header.js
index 0b22e1508..39b1fbef6 100644
--- a/code/src/Components/Header.js
+++ b/code/src/Components/Header.js
@@ -1,6 +1,9 @@
-import React from 'react'
+/* eslint-disable jsx-a11y/label-has-associated-control */
+import React from 'react';
const Header = () => {
+/* const [category, setCategory] = useState('popular'); */
+
return (
@@ -14,4 +17,13 @@ const Header = () => {
)
}
-export default Header;
\ No newline at end of file
+
+export default Header;
+
+/*
*/
\ No newline at end of file
diff --git a/code/src/Components/MovieDetails.js b/code/src/Components/MovieDetails.js
index 036c114d8..781bd971a 100644
--- a/code/src/Components/MovieDetails.js
+++ b/code/src/Components/MovieDetails.js
@@ -53,7 +53,7 @@ const MovieDetails = () => {
-
{details.title}
+
{details.title} ⭐️{Math.round(details.vote_average * 10) / 10}
{details.overview}
From 276a07f3a1ae1e4c24bf74f9d68bb6f8942f3528 Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Mon, 3 Apr 2023 11:05:33 +0200
Subject: [PATCH 28/33] fixed intro
---
code/src/Components/MovieList.js | 37 +++++++++++++++++---------------
1 file changed, 20 insertions(+), 17 deletions(-)
diff --git a/code/src/Components/MovieList.js b/code/src/Components/MovieList.js
index 13e6b3f13..7697485ed 100644
--- a/code/src/Components/MovieList.js
+++ b/code/src/Components/MovieList.js
@@ -4,7 +4,7 @@ import { Link } from 'react-router-dom';
import Popcorn from './Intro';
import Header from './Header';
/* STARTPAGE */
-const MoviesList = () => {
+const MovieList = () => {
const [list, setList] = useState([]);
const [loading, setLoading] = useState(false);
@@ -26,23 +26,26 @@ const MoviesList = () => {
/* This return shows the img, titles, rdate & the id on our HTML page */
return (
- {loading && ()}
-
-
- {list.map((movie) => (
-
-
-
-
-
{movie.title}
-
Released {movie.release_date}
-
-
-
- ))}
-
+ {loading ? () : (
+ <>
+
+
+ {list.map((movie) => (
+
+
+
+
+
{movie.title}
+
Released {movie.release_date}
+
+
+
+ ))}
+
+ >
+ )}
)
}
-export default MoviesList;
\ No newline at end of file
+export default MovieList;
\ No newline at end of file
From d2f072e10bcc1487e7cfc1f4d502f6c701dab880 Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Mon, 3 Apr 2023 11:15:17 +0200
Subject: [PATCH 29/33] Co-authored-by: Matilda Brunemalm
---
code/src/App.js | 6 +++---
code/src/{Components => komponenter}/Header.js | 0
code/src/{Components => komponenter}/Intro.js | 0
code/src/{Components => komponenter}/MovieDetails.js | 2 +-
code/src/{Components => komponenter}/MovieList.js | 0
code/src/{Components => komponenter}/NotFound.js | 0
6 files changed, 4 insertions(+), 4 deletions(-)
rename code/src/{Components => komponenter}/Header.js (100%)
rename code/src/{Components => komponenter}/Intro.js (100%)
rename code/src/{Components => komponenter}/MovieDetails.js (97%)
rename code/src/{Components => komponenter}/MovieList.js (100%)
rename code/src/{Components => komponenter}/NotFound.js (100%)
diff --git a/code/src/App.js b/code/src/App.js
index c82d3ab44..cd9163de3 100644
--- a/code/src/App.js
+++ b/code/src/App.js
@@ -1,8 +1,8 @@
import React from 'react'
import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom'
-import MovieList from 'components/MovieList'
-import MovieDetails from 'components/MovieDetails'
-import NotFound from 'components/NotFound'
+import MovieList from 'komponenter/MovieList'
+import MovieDetails from 'komponenter/MovieDetails'
+import NotFound from 'komponenter/NotFound'
export const App = () => {
return (
diff --git a/code/src/Components/Header.js b/code/src/komponenter/Header.js
similarity index 100%
rename from code/src/Components/Header.js
rename to code/src/komponenter/Header.js
diff --git a/code/src/Components/Intro.js b/code/src/komponenter/Intro.js
similarity index 100%
rename from code/src/Components/Intro.js
rename to code/src/komponenter/Intro.js
diff --git a/code/src/Components/MovieDetails.js b/code/src/komponenter/MovieDetails.js
similarity index 97%
rename from code/src/Components/MovieDetails.js
rename to code/src/komponenter/MovieDetails.js
index 781bd971a..672d494e8 100644
--- a/code/src/Components/MovieDetails.js
+++ b/code/src/komponenter/MovieDetails.js
@@ -2,7 +2,7 @@
/* eslint-disable jsx-a11y/no-static-element-interactions */
import React, { useState, useEffect } from 'react'
import { useParams, useNavigate } from 'react-router-dom'
-import NotFound from 'components/NotFound'
+import NotFound from 'komponenter/NotFound'
/* PAGE 2 */
const MovieDetails = () => {
diff --git a/code/src/Components/MovieList.js b/code/src/komponenter/MovieList.js
similarity index 100%
rename from code/src/Components/MovieList.js
rename to code/src/komponenter/MovieList.js
diff --git a/code/src/Components/NotFound.js b/code/src/komponenter/NotFound.js
similarity index 100%
rename from code/src/Components/NotFound.js
rename to code/src/komponenter/NotFound.js
From 60cea3ac99f2a5c5ca0eba5533440f41e45c0075 Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Mon, 3 Apr 2023 11:16:03 +0200
Subject: [PATCH 30/33] .
---
code/src/App.js | 6 +++---
code/src/{komponenter => components}/Header.js | 0
code/src/{komponenter => components}/Intro.js | 0
code/src/{komponenter => components}/MovieDetails.js | 2 +-
code/src/{komponenter => components}/MovieList.js | 0
code/src/{komponenter => components}/NotFound.js | 0
6 files changed, 4 insertions(+), 4 deletions(-)
rename code/src/{komponenter => components}/Header.js (100%)
rename code/src/{komponenter => components}/Intro.js (100%)
rename code/src/{komponenter => components}/MovieDetails.js (97%)
rename code/src/{komponenter => components}/MovieList.js (100%)
rename code/src/{komponenter => components}/NotFound.js (100%)
diff --git a/code/src/App.js b/code/src/App.js
index cd9163de3..c82d3ab44 100644
--- a/code/src/App.js
+++ b/code/src/App.js
@@ -1,8 +1,8 @@
import React from 'react'
import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom'
-import MovieList from 'komponenter/MovieList'
-import MovieDetails from 'komponenter/MovieDetails'
-import NotFound from 'komponenter/NotFound'
+import MovieList from 'components/MovieList'
+import MovieDetails from 'components/MovieDetails'
+import NotFound from 'components/NotFound'
export const App = () => {
return (
diff --git a/code/src/komponenter/Header.js b/code/src/components/Header.js
similarity index 100%
rename from code/src/komponenter/Header.js
rename to code/src/components/Header.js
diff --git a/code/src/komponenter/Intro.js b/code/src/components/Intro.js
similarity index 100%
rename from code/src/komponenter/Intro.js
rename to code/src/components/Intro.js
diff --git a/code/src/komponenter/MovieDetails.js b/code/src/components/MovieDetails.js
similarity index 97%
rename from code/src/komponenter/MovieDetails.js
rename to code/src/components/MovieDetails.js
index 672d494e8..781bd971a 100644
--- a/code/src/komponenter/MovieDetails.js
+++ b/code/src/components/MovieDetails.js
@@ -2,7 +2,7 @@
/* eslint-disable jsx-a11y/no-static-element-interactions */
import React, { useState, useEffect } from 'react'
import { useParams, useNavigate } from 'react-router-dom'
-import NotFound from 'komponenter/NotFound'
+import NotFound from 'components/NotFound'
/* PAGE 2 */
const MovieDetails = () => {
diff --git a/code/src/komponenter/MovieList.js b/code/src/components/MovieList.js
similarity index 100%
rename from code/src/komponenter/MovieList.js
rename to code/src/components/MovieList.js
diff --git a/code/src/komponenter/NotFound.js b/code/src/components/NotFound.js
similarity index 100%
rename from code/src/komponenter/NotFound.js
rename to code/src/components/NotFound.js
From 485c076e19d5fa2e8e91a455c67afa0af1eee3c5 Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Mon, 3 Apr 2023 11:26:55 +0200
Subject: [PATCH 31/33] all done
---
code/src/components/Header.js | 6 +++---
code/src/components/MovieList.js | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/code/src/components/Header.js b/code/src/components/Header.js
index 39b1fbef6..db0f9c747 100644
--- a/code/src/components/Header.js
+++ b/code/src/components/Header.js
@@ -1,10 +1,10 @@
/* eslint-disable jsx-a11y/label-has-associated-control */
-import React from 'react';
+/* import React from 'react';
const Header = () => {
/* const [category, setCategory] = useState('popular'); */
- return (
+/* return (
@@ -19,7 +19,7 @@ const Header = () => {
}
export default Header;
-
+ */
/*