From 02225031f04374ddf26f77958654bb820ff48072 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20G=C3=B3rski?= <158020641+itsXenthis@users.noreply.github.com> Date: Wed, 20 Mar 2024 13:15:27 +0100 Subject: [PATCH 01/12] Update App --- src/App.tsx | 92 ++--------------------------------------------------- 1 file changed, 3 insertions(+), 89 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index ef0554b28..580bc14d7 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,99 +1,13 @@ /* eslint-disable max-len */ import React from 'react'; - import './App.scss'; -// import moviesFromServer from './api/movies.json'; +import moviesFromServer from './api/movies.json'; +import { MoviesList } from './components/MoviesList'; export const App: React.FC = () => (
-
-
-
-
- Film logo -
-
- -
-
-
-
- imdb -
-
- -
-

- Inception -

-
-
- -
-

- Follows the lives of eight very different couples in dealing - with their love lives in various loosely interrelated tales all - set during a frantic month before Christmas in London, England. -

- - - IMDB - -
-
-
- -
-
-
- Film logo -
-
- -
-
-
-
- imdb -
-
- -
-

- Love Actually -

-
-
- -
-

- A thief who steals corporate secrets through the use of - dream-sharing technology is given the inverse task of planting - an idea into the mind of a C.E.O. -

- - - IMDB - -
-
-
-
+
From 2b92c21208e151ccceef683ead2973b798516825 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20G=C3=B3rski?= <158020641+itsXenthis@users.noreply.github.com> Date: Wed, 20 Mar 2024 13:16:13 +0100 Subject: [PATCH 02/12] Update MovieCard --- src/components/MovieCard/MovieCard.tsx | 58 +++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 2 deletions(-) diff --git a/src/components/MovieCard/MovieCard.tsx b/src/components/MovieCard/MovieCard.tsx index 4a3f960c0..17469df56 100644 --- a/src/components/MovieCard/MovieCard.tsx +++ b/src/components/MovieCard/MovieCard.tsx @@ -1,5 +1,59 @@ import React from 'react'; - import './MovieCard.scss'; +import { Movie } from '../../types/Movie'; + +interface Props { + movie: Movie; +} + +export const MovieCard: React.FC = ({ movie }) => { + const { + title, + description, + imgUrl, + imdbUrl, + } = movie; + + return ( +
+
+
+ Film logo +
+
+ +
+
+
+
+ imdb +
+
+ +
+

+ {title} +

+
+
+ +
+

+ {description} +

-export const MovieCard: React.FC = () => <>Put the card here; + + IMDB + +
+
+
+ ); +}; From e2021ced4041efbca15ce63e447b6144f41e6268 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20G=C3=B3rski?= <158020641+itsXenthis@users.noreply.github.com> Date: Wed, 20 Mar 2024 13:16:52 +0100 Subject: [PATCH 03/12] Update MoviesList --- src/components/MoviesList/MoviesList.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/components/MoviesList/MoviesList.tsx b/src/components/MoviesList/MoviesList.tsx index 723654f39..4e225ba28 100644 --- a/src/components/MoviesList/MoviesList.tsx +++ b/src/components/MoviesList/MoviesList.tsx @@ -1,4 +1,16 @@ import React from 'react'; import './MoviesList.scss'; +import { MovieCard } from '../MovieCard'; +import { Movie } from '../../types/Movie'; -export const MoviesList: React.FC = () => <>Put the list here; +interface Props { + movies: Movie[]; +} + +export const MoviesList: React.FC = ({ movies }) => ( +
+ {movies.map((movie) => ( + + ))} +
+); From b34ab5c384b3b09ffc7b8af1232ffb1537b8062e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20G=C3=B3rski?= <158020641+itsXenthis@users.noreply.github.com> Date: Wed, 20 Mar 2024 13:17:56 +0100 Subject: [PATCH 04/12] Update Movie --- src/types/Movie.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/types/Movie.ts b/src/types/Movie.ts index dbd7f73f7..551d83336 100644 --- a/src/types/Movie.ts +++ b/src/types/Movie.ts @@ -1,5 +1,7 @@ export interface Movie { title: string; - - // add all the other field + description: string; + imgUrl: string; + imdbUrl: string; + imdbId: string; } From 27215bc47a8c686913bd09aae65e41525306e9f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20G=C3=B3rski?= <158020641+itsXenthis@users.noreply.github.com> Date: Wed, 20 Mar 2024 14:10:07 +0100 Subject: [PATCH 05/12] Update App 2 --- src/App.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/App.tsx b/src/App.tsx index 580bc14d7..bb7273a02 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,5 +1,6 @@ /* eslint-disable max-len */ import React from 'react'; + import './App.scss'; import moviesFromServer from './api/movies.json'; import { MoviesList } from './components/MoviesList'; From 03792e63facae0a9a3a04e8b686ed71d453ce8d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20G=C3=B3rski?= <158020641+itsXenthis@users.noreply.github.com> Date: Wed, 20 Mar 2024 14:11:10 +0100 Subject: [PATCH 06/12] Update MovieCard 2 --- src/components/MovieCard/MovieCard.tsx | 76 ++++++++++---------------- 1 file changed, 30 insertions(+), 46 deletions(-) diff --git a/src/components/MovieCard/MovieCard.tsx b/src/components/MovieCard/MovieCard.tsx index 17469df56..092599bc1 100644 --- a/src/components/MovieCard/MovieCard.tsx +++ b/src/components/MovieCard/MovieCard.tsx @@ -1,59 +1,43 @@ +/* eslint-disable max-len */ import React from 'react'; + import './MovieCard.scss'; import { Movie } from '../../types/Movie'; -interface Props { +type Props = { movie: Movie; -} - -export const MovieCard: React.FC = ({ movie }) => { - const { - title, - description, - imgUrl, - imdbUrl, - } = movie; - - return ( -
-
-
- Film logo -
-
+}; -
-
-
-
- imdb -
-
+export const MovieCard: React.FC = ({ movie }) => ( +
+
+
+ Film logo +
+
-
-

- {title} -

-
+
+
+
+
+ imdb +
-
-

- {description} +

+

+ {movie.title}

- - - IMDB -
+ +
+

{movie.description}

+ + + IMDB + +
- ); -}; +
+); From 7873ff01e183f2296994a13f5f19f1330810075b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20G=C3=B3rski?= <158020641+itsXenthis@users.noreply.github.com> Date: Wed, 20 Mar 2024 14:11:59 +0100 Subject: [PATCH 07/12] Update MoviesList 2 --- src/components/MoviesList/MoviesList.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/MoviesList/MoviesList.tsx b/src/components/MoviesList/MoviesList.tsx index 4e225ba28..52e13c081 100644 --- a/src/components/MoviesList/MoviesList.tsx +++ b/src/components/MoviesList/MoviesList.tsx @@ -1,16 +1,17 @@ +/* eslint-disable max-len */ import React from 'react'; import './MoviesList.scss'; -import { MovieCard } from '../MovieCard'; import { Movie } from '../../types/Movie'; +import { MovieCard } from '../MovieCard'; -interface Props { +type Props = { movies: Movie[]; -} +}; export const MoviesList: React.FC = ({ movies }) => (
- {movies.map((movie) => ( - + {movies.map(movie => ( + ))}
); From 8e6d047556a4959314fba96b822feadfee6f0e94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20G=C3=B3rski?= <158020641+itsXenthis@users.noreply.github.com> Date: Wed, 20 Mar 2024 15:06:44 +0100 Subject: [PATCH 08/12] Update Lint --- .eslintrc.js | 1 - 1 file changed, 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index 7c6c7923c..53eea4d64 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,6 +1,5 @@ module.exports = { extends: [ - '@mate-academy/eslint-config-react-typescript', 'plugin:cypress/recommended', ], rules: {}, From 8f7e013479ce741f823f9db9478d7fb8dde6f0ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20G=C3=B3rski?= <158020641+itsXenthis@users.noreply.github.com> Date: Wed, 20 Mar 2024 15:48:57 +0100 Subject: [PATCH 09/12] Update Lint 2 --- .eslintrc.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 53eea4d64..aeb79e7e2 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,6 +1,12 @@ module.exports = { - extends: [ - 'plugin:cypress/recommended', - ], - rules: {}, + extends: ['@mate-academy/eslint-config-react-typescript', 'plugin:cypress/recommended'], + rules: { + 'max-len': ['error', { + ignoreTemplateLiterals: true, + ignoreComments: true, + }], + 'jsx-a11y/label-has-associated-control': ["error", { + assert: "either", + }], + }, }; From 98fd48c74100cfb7803b6c11fb89b01afcad3c90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20G=C3=B3rski?= <158020641+itsXenthis@users.noreply.github.com> Date: Wed, 20 Mar 2024 16:46:14 +0100 Subject: [PATCH 10/12] Update Lint 3 --- .eslintrc.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index aeb79e7e2..53eea4d64 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,12 +1,6 @@ module.exports = { - extends: ['@mate-academy/eslint-config-react-typescript', 'plugin:cypress/recommended'], - rules: { - 'max-len': ['error', { - ignoreTemplateLiterals: true, - ignoreComments: true, - }], - 'jsx-a11y/label-has-associated-control': ["error", { - assert: "either", - }], - }, + extends: [ + 'plugin:cypress/recommended', + ], + rules: {}, }; From 48d54eeb4ba21e928e193af6a19911662d56edfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20G=C3=B3rski?= <158020641+itsXenthis@users.noreply.github.com> Date: Mon, 25 Mar 2024 00:48:55 +0100 Subject: [PATCH 11/12] Update package.json --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 8edf0ad31..c25021e80 100644 --- a/package.json +++ b/package.json @@ -17,13 +17,13 @@ "devDependencies": { "@babel/plugin-proposal-private-property-in-object": "^7.21.11", "@mate-academy/eslint-config-react-typescript": "latest", - "@mate-academy/scripts": "^1.7.8", + "@mate-academy/scripts": "^1.7.9", "@mate-academy/students-ts-config": "latest", "@mate-academy/stylelint-config": "latest", "@types/node": "^16.18.80", "@types/react": "^18.2.55", "@types/react-dom": "^18.2.19", - "cypress": "^12.17.4", + "cypress": "^13.7.0", "eslint": "^7.32.0", "eslint-plugin-cypress": "^2.11.2", "gh-pages": "^6.1.1", From 8d764ab4ae7b1f4f153a1fe0691079fc3764c698 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20G=C3=B3rski?= <158020641+itsXenthis@users.noreply.github.com> Date: Mon, 25 Mar 2024 00:52:27 +0100 Subject: [PATCH 12/12] Update .eslintrc.js --- .eslintrc.js | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc.js b/.eslintrc.js index 53eea4d64..7c6c7923c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,5 +1,6 @@ module.exports = { extends: [ + '@mate-academy/eslint-config-react-typescript', 'plugin:cypress/recommended', ], rules: {},