From 0e752691996e58ebe288697069dd32ee5e9d744b Mon Sep 17 00:00:00 2001 From: Mridul2820 Date: Wed, 1 Jun 2022 00:42:58 +0530 Subject: [PATCH 01/24] person data fetch --- src/App.js | 3 ++ src/components/details/CastnCrew.js | 44 +++++++++-------- src/constants/routes.js | 4 ++ src/data/menuData.js | 4 ++ src/helpers/config.js | 4 +- src/pages/withid/PersonDetail.js | 74 +++++++++++++++++++++++++++++ 6 files changed, 112 insertions(+), 21 deletions(-) create mode 100644 src/pages/withid/PersonDetail.js diff --git a/src/App.js b/src/App.js index 5f6f816..fba3809 100644 --- a/src/App.js +++ b/src/App.js @@ -37,6 +37,7 @@ const SeriesUpcoming = lazy(() => import('./pages/series/SeriesUpcoming')); const ChatPage = lazy(() => import('./pages/ChatPage')); const DetailsPage = lazy(() => import('./pages/withid/DetailsPage')); const GenreDetail = lazy(() => import('./pages/withid/GenreDetail')); +const PersonDetail = lazy(() => import('./pages/withid/PersonDetail')); const NotFound = lazy(() => import('./pages/NotFound')); @@ -144,6 +145,8 @@ const App = () => { exact /> + + diff --git a/src/components/details/CastnCrew.js b/src/components/details/CastnCrew.js index b775d2e..fbd2715 100644 --- a/src/components/details/CastnCrew.js +++ b/src/components/details/CastnCrew.js @@ -1,6 +1,6 @@ import React from 'react'; import styled from 'styled-components'; -import { img200, noPicture } from '../../helpers/config'; +import { img200, noUserImg } from '../../helpers/config'; const CastnCrew = ({ credits, title }) => { return ( @@ -9,25 +9,29 @@ const CastnCrew = ({ credits, title }) => { {credits && credits.length > 0 ? (
{credits.map((credit) => ( - - {credit?.name} -
-

{credit.name}

- {credit.character && ( -

- as {credit.character} -

- )} -
-
+ + +
+ {credit?.name} +
+
+

{credit.name}

+ {credit.character && ( +

+ as {credit.character} +

+ )} +
+
+
))}
) : ( diff --git a/src/constants/routes.js b/src/constants/routes.js index 51dccac..4323f75 100644 --- a/src/constants/routes.js +++ b/src/constants/routes.js @@ -20,6 +20,10 @@ export const Series_Popular = '/popular-series'; export const Series_Top_Rated = '/top-rated-series'; export const Series_Upcoming = '/upcoming-series'; +// Credits +export const Person_Detail = '/person/:id'; +export const Credit_Search = '/search-credit'; + export const Chats = '/chats'; export const Details = '/:type/:id'; diff --git a/src/data/menuData.js b/src/data/menuData.js index f2195bb..18d311b 100644 --- a/src/data/menuData.js +++ b/src/data/menuData.js @@ -101,4 +101,8 @@ export const optionsAll = [ title: 'Search', route: ROUTES.Search, }, + { + title: 'Credit Search', + route: ROUTES.Credit_Search, + }, ]; diff --git a/src/helpers/config.js b/src/helpers/config.js index 73bdf8f..92a2b4d 100644 --- a/src/helpers/config.js +++ b/src/helpers/config.js @@ -11,6 +11,8 @@ export const unavailable = export const unavailableLandscape = 'https://user-images.githubusercontent.com/10515204/56117400-9a911800-5f85-11e9-878b-3f998609a6c8.jpg'; -// For Carousel +// Not Found export const noPicture = 'https://upload.wikimedia.org/wikipedia/en/6/60/No_Picture.jpg'; +export const noUserImg = + 'https://upload.wikimedia.org/wikipedia/commons/8/89/Portrait_Placeholder.png'; diff --git a/src/pages/withid/PersonDetail.js b/src/pages/withid/PersonDetail.js new file mode 100644 index 0000000..a7d50fd --- /dev/null +++ b/src/pages/withid/PersonDetail.js @@ -0,0 +1,74 @@ +import axios from 'axios'; +import React, { useEffect, useState } from 'react'; +import Loader from 'react-loader-spinner'; +import { useParams } from 'react-router-dom'; +import { API_URL, BASE_URL } from '../../constants/constant'; +import { img500 } from '../../helpers/config'; + +import { Container } from '../../styles/Styles'; + +const detailURL = `${API_URL}/`; +const apiKey = `api_key=${process.env.REACT_APP_TMDB}`; + +const PersonDetail = () => { + const { id } = useParams(); + + const [creditData, setCreditData] = useState(); + const [loading, setLoading] = useState(false); + + console.log(creditData); + + const fetchData = async () => { + setLoading(true); + const { data } = await axios( + `${detailURL}person/${id}?${apiKey}&language=en&append_to_response=external_ids,combined_credits,images,tagged_images` + ); + + setCreditData(data); + setLoading(false); + }; + + useEffect(() => { + fetchData(); + // eslint-disable-next-line + }, []); + + if (loading) { + return ( + + + + ); + } + + return ( + +
+ {creditData?.name} +
+

+ {creditData?.name} +

+

Biography

+

{creditData?.biography}

+
+
+
+ ); +}; + +export default PersonDetail; From aea516f2b5d5e6e9f833c3237ac6000b4bb46597 Mon Sep 17 00:00:00 2001 From: Mridul2820 Date: Wed, 1 Jun 2022 10:03:37 +0530 Subject: [PATCH 02/24] tailwind typograpy add --- package-lock.json | 50 ++++++++++++++++++++++++++++++++ package.json | 1 + src/pages/withid/PersonDetail.js | 4 ++- tailwind.config.js | 2 +- 4 files changed, 55 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index df26a48..a2ca33a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,6 +28,7 @@ "web-vitals": "^2.1.2" }, "devDependencies": { + "@tailwindcss/typography": "^0.5.2", "autoprefixer": "^10.4.7", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.0.0", @@ -4279,6 +4280,20 @@ "url": "https://github.com/sponsors/gregberge" } }, + "node_modules/@tailwindcss/typography": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.2.tgz", + "integrity": "sha512-coq8DBABRPFcVhVIk6IbKyyHUt7YTEC/C992tatFB+yEx5WGBQrCgsSFjxHUr8AWXphWckadVJbominEduYBqw==", + "dev": true, + "dependencies": { + "lodash.castarray": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.merge": "^4.6.2" + }, + "peerDependencies": { + "tailwindcss": ">=3.0.0 || >= 3.0.0-alpha.1 || insiders" + } + }, "node_modules/@tootallnate/once": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", @@ -12266,11 +12281,23 @@ "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" }, + "node_modules/lodash.castarray": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.castarray/-/lodash.castarray-4.4.0.tgz", + "integrity": "sha512-aVx8ztPv7/2ULbArGJ2Y42bG1mEQ5mGjpdvrbJcJFU3TbYybe+QlLS4pst9zV52ymy2in1KpFPiZnAOATxD4+Q==", + "dev": true + }, "node_modules/lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=" }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", + "dev": true + }, "node_modules/lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -20996,6 +21023,17 @@ "loader-utils": "^2.0.0" } }, + "@tailwindcss/typography": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.2.tgz", + "integrity": "sha512-coq8DBABRPFcVhVIk6IbKyyHUt7YTEC/C992tatFB+yEx5WGBQrCgsSFjxHUr8AWXphWckadVJbominEduYBqw==", + "dev": true, + "requires": { + "lodash.castarray": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.merge": "^4.6.2" + } + }, "@tootallnate/once": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", @@ -26906,11 +26944,23 @@ "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" }, + "lodash.castarray": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.castarray/-/lodash.castarray-4.4.0.tgz", + "integrity": "sha512-aVx8ztPv7/2ULbArGJ2Y42bG1mEQ5mGjpdvrbJcJFU3TbYybe+QlLS4pst9zV52ymy2in1KpFPiZnAOATxD4+Q==", + "dev": true + }, "lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=" }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", + "dev": true + }, "lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", diff --git a/package.json b/package.json index 0bf08c2..89dcbf9 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ ] }, "devDependencies": { + "@tailwindcss/typography": "^0.5.2", "autoprefixer": "^10.4.7", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.0.0", diff --git a/src/pages/withid/PersonDetail.js b/src/pages/withid/PersonDetail.js index a7d50fd..9326c77 100644 --- a/src/pages/withid/PersonDetail.js +++ b/src/pages/withid/PersonDetail.js @@ -64,7 +64,9 @@ const PersonDetail = () => { {creditData?.name}

Biography

-

{creditData?.biography}

+

+ {creditData?.biography} +

diff --git a/tailwind.config.js b/tailwind.config.js index d601139..60a0d3b 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -81,5 +81,5 @@ module.exports = { }, }, }, - plugins: [require('flowbite/plugin')], + plugins: [require('flowbite/plugin'), require('@tailwindcss/typography')], }; From 89d6fe79ece65006bcc881d3a821c8664b7a631d Mon Sep 17 00:00:00 2001 From: Mridul2820 Date: Wed, 1 Jun 2022 18:33:49 +0530 Subject: [PATCH 03/24] person detail section --- src/components/person/DetailCard.js | 76 ++++++++++++++++++++++++++++ src/components/person/PersonIntro.js | 30 +++++++++++ src/components/widget/SocialLinks.js | 55 ++++++++++++++++++++ src/helpers/getAge.js | 10 ++++ src/pages/withid/PersonDetail.js | 26 +++------- 5 files changed, 177 insertions(+), 20 deletions(-) create mode 100644 src/components/person/DetailCard.js create mode 100644 src/components/person/PersonIntro.js create mode 100644 src/components/widget/SocialLinks.js create mode 100644 src/helpers/getAge.js diff --git a/src/components/person/DetailCard.js b/src/components/person/DetailCard.js new file mode 100644 index 0000000..0479fca --- /dev/null +++ b/src/components/person/DetailCard.js @@ -0,0 +1,76 @@ +import React from 'react'; +import { getAge } from '../../helpers/getAge'; +import SocialLinks from '../widget/SocialLinks'; + +const DetailCard = ({ creditData }) => { + const { + external_ids, + birthday, + place_of_birth, + also_known_as, + known_for_department, + } = creditData; + return ( +
+ + +
+

Personal Info

+ {known_for_department && ( +
+

+ Known For : + {known_for_department} +

+
+ )} + {birthday && ( +
+

+ Birthday : + {birthday} +

+
+ )} + {birthday && ( +
+

+ Age : + {getAge(birthday)} +

+
+ )} + {place_of_birth && ( +
+

+ Place of birth : + {place_of_birth} +

+
+ )} + {also_known_as && also_known_as.length > 0 && ( +
+

+ Also Known As : +

+ {also_known_as.map((name, index) => ( +
+

{index + 1}.

+ {name} +
+ ))} +
+

+
+ )} +
+
+ ); +}; + +export default DetailCard; diff --git a/src/components/person/PersonIntro.js b/src/components/person/PersonIntro.js new file mode 100644 index 0000000..a276996 --- /dev/null +++ b/src/components/person/PersonIntro.js @@ -0,0 +1,30 @@ +import React from 'react'; +import { img500 } from '../../helpers/config'; + +const PersonIntro = ({ creditData }) => { + return ( +
+ {creditData?.name} +
+

+ {creditData?.name} +

+

Biography

+

+

+
+ ); +}; + +export default PersonIntro; diff --git a/src/components/widget/SocialLinks.js b/src/components/widget/SocialLinks.js new file mode 100644 index 0000000..eb350a8 --- /dev/null +++ b/src/components/widget/SocialLinks.js @@ -0,0 +1,55 @@ +import React from 'react'; +import { GrFacebook, GrInstagram, GrTwitter } from 'react-icons/gr'; +import { FaImdb } from 'react-icons/fa'; + +const SocialLinks = ({ facebook, instagram, twitter, imdb }) => { + return ( +
+ {facebook && ( + + + + )} + + {instagram && ( + + + + )} + + {twitter && ( + + + + )} + + {twitter && ( + + + + )} +
+ ); +}; + +export default SocialLinks; diff --git a/src/helpers/getAge.js b/src/helpers/getAge.js new file mode 100644 index 0000000..d1c4bf9 --- /dev/null +++ b/src/helpers/getAge.js @@ -0,0 +1,10 @@ +export const getAge = (dateString) => { + var today = new Date(); + var birthDate = new Date(dateString); + var age = today.getFullYear() - birthDate.getFullYear(); + var m = today.getMonth() - birthDate.getMonth(); + if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) { + age--; + } + return age; +}; diff --git a/src/pages/withid/PersonDetail.js b/src/pages/withid/PersonDetail.js index 9326c77..d3e4fd7 100644 --- a/src/pages/withid/PersonDetail.js +++ b/src/pages/withid/PersonDetail.js @@ -2,8 +2,9 @@ import axios from 'axios'; import React, { useEffect, useState } from 'react'; import Loader from 'react-loader-spinner'; import { useParams } from 'react-router-dom'; +import DetailCard from '../../components/person/DetailCard'; +import PersonIntro from '../../components/person/PersonIntro'; import { API_URL, BASE_URL } from '../../constants/constant'; -import { img500 } from '../../helpers/config'; import { Container } from '../../styles/Styles'; @@ -49,25 +50,10 @@ const PersonDetail = () => { return ( -
- {creditData?.name} -
-

- {creditData?.name} -

-

Biography

-

- {creditData?.biography} -

-
+ {creditData && } + +
+ {creditData && }
); From 30e1d82761f514e730c8225f37d0de4a4739e02c Mon Sep 17 00:00:00 2001 From: Mridul2820 Date: Wed, 1 Jun 2022 18:59:58 +0530 Subject: [PATCH 04/24] markdown content add --- package-lock.json | 1004 ++++++++++++++++++++++++++ package.json | 2 + src/components/details/BannerInfo.js | 50 +- src/components/person/DetailCard.js | 4 +- src/components/person/PersonIntro.js | 14 +- 5 files changed, 1025 insertions(+), 49 deletions(-) diff --git a/package-lock.json b/package-lock.json index a2ca33a..463852c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,8 +21,10 @@ "react-dom": "^17.0.2", "react-icons": "^4.3.1", "react-loader-spinner": "^4.0.0", + "react-markdown": "^6.0.3", "react-router-dom": "^5.2.0", "react-scripts": "5.0.0", + "rehype-raw": "^5.1.0", "styled-components": "^5.3.5", "uuid": "^8.3.2", "web-vitals": "^2.1.2" @@ -4433,6 +4435,14 @@ "@types/node": "*" } }, + "node_modules/@types/hast": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.4.tgz", + "integrity": "sha512-wLEm0QvaoawEDoTRwzTXp4b4jpwiJDvR5KMnFnVodm3scufTlBOWRD6N1OBf9TZMhjlNsSfcO5V+7AF4+Vy+9g==", + "dependencies": { + "@types/unist": "*" + } + }, "node_modules/@types/html-minifier-terser": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz", @@ -4482,6 +4492,14 @@ "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" }, + "node_modules/@types/mdast": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.10.tgz", + "integrity": "sha512-W864tg/Osz1+9f4lrGTZpCSO5/z4608eUp19tbozkq2HJK6i3z1kT0H9tlADXuYIb1YYOBByU4Jsqkk75q48qA==", + "dependencies": { + "@types/unist": "*" + } + }, "node_modules/@types/mime": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", @@ -4497,6 +4515,11 @@ "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==" }, + "node_modules/@types/parse5": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-5.0.3.tgz", + "integrity": "sha512-kUNnecmtkunAoQ3CnjmMkzNU/gtxG8guhi+Fk2U/kOpIKjIMKnXGp4IJCgQJrXSgMsWYimYG4TGjz/UzbGEBTw==" + }, "node_modules/@types/prettier": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.6.1.tgz", @@ -4609,6 +4632,11 @@ "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.2.tgz", "integrity": "sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==" }, + "node_modules/@types/unist": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz", + "integrity": "sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==" + }, "node_modules/@types/ws": { "version": "8.5.3", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz", @@ -5747,6 +5775,15 @@ "node": ">=10" } }, + "node_modules/bail": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz", + "integrity": "sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -6076,6 +6113,33 @@ "node": ">=10" } }, + "node_modules/character-entities": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", + "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-legacy": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", + "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-reference-invalid": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", + "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/charcodes": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/charcodes/-/charcodes-0.2.0.tgz", @@ -6255,6 +6319,15 @@ "node": ">= 0.8" } }, + "node_modules/comma-separated-tokens": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz", + "integrity": "sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/commander": { "version": "8.3.0", "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", @@ -9205,6 +9278,104 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/hast-to-hyperscript": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/hast-to-hyperscript/-/hast-to-hyperscript-9.0.1.tgz", + "integrity": "sha512-zQgLKqF+O2F72S1aa4y2ivxzSlko3MAvxkwG8ehGmNiqd98BIN3JM1rAJPmplEyLmGLO2QZYJtIneOSZ2YbJuA==", + "dependencies": { + "@types/unist": "^2.0.3", + "comma-separated-tokens": "^1.0.0", + "property-information": "^5.3.0", + "space-separated-tokens": "^1.0.0", + "style-to-object": "^0.3.0", + "unist-util-is": "^4.0.0", + "web-namespaces": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-from-parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-6.0.1.tgz", + "integrity": "sha512-jeJUWiN5pSxW12Rh01smtVkZgZr33wBokLzKLwinYOUfSzm1Nl/c3GUGebDyOKjdsRgMvoVbV0VpAcpjF4NrJA==", + "dependencies": { + "@types/parse5": "^5.0.0", + "hastscript": "^6.0.0", + "property-information": "^5.0.0", + "vfile": "^4.0.0", + "vfile-location": "^3.2.0", + "web-namespaces": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-parse-selector": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz", + "integrity": "sha512-7j6mrk/qqkSehsM92wQjdIgWM2/BW61u/53G6xmC8i1OmEdKLHbk419QKQUjz6LglWsfqoiHmyMRkP1BGjecNQ==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-raw": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-6.1.0.tgz", + "integrity": "sha512-5FoZLDHBpka20OlZZ4I/+RBw5piVQ8iI1doEvffQhx5CbCyTtP8UCq8Tw6NmTAMtXgsQxmhW7Ly8OdFre5/YMQ==", + "dependencies": { + "@types/hast": "^2.0.0", + "hast-util-from-parse5": "^6.0.0", + "hast-util-to-parse5": "^6.0.0", + "html-void-elements": "^1.0.0", + "parse5": "^6.0.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0", + "vfile": "^4.0.0", + "web-namespaces": "^1.0.0", + "xtend": "^4.0.0", + "zwitch": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-to-parse5": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-6.0.0.tgz", + "integrity": "sha512-Lu5m6Lgm/fWuz8eWnrKezHtVY83JeRGaNQ2kn9aJgqaxvVkFCZQBEhgodZUDUvoodgyROHDb3r5IxAEdl6suJQ==", + "dependencies": { + "hast-to-hyperscript": "^9.0.0", + "property-information": "^5.0.0", + "web-namespaces": "^1.0.0", + "xtend": "^4.0.0", + "zwitch": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hastscript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-6.0.0.tgz", + "integrity": "sha512-nDM6bvd7lIqDUiYEiu5Sl/+6ReP0BMk/2f4U/Rooccxkj0P5nm+acM5PrGJ/t5I8qPGiqZSE6hVAwZEdZIvP4w==", + "dependencies": { + "@types/hast": "^2.0.0", + "comma-separated-tokens": "^1.0.0", + "hast-util-parse-selector": "^2.0.0", + "property-information": "^5.0.0", + "space-separated-tokens": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -9343,6 +9514,15 @@ "node": ">=10.23.2" } }, + "node_modules/html-void-elements": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-1.0.5.tgz", + "integrity": "sha512-uE/TxKuyNIcx44cIWnjr/rfIATDH7ZaOMmstu0CwhFG1Dunhlp4OC6/NMbhiwoq5BpW0ubi303qnEk/PZj614w==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/html-webpack-plugin": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-5.5.0.tgz", @@ -9597,6 +9777,11 @@ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" }, + "node_modules/inline-style-parser": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.1.1.tgz", + "integrity": "sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==" + }, "node_modules/internal-slot": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", @@ -9618,6 +9803,28 @@ "node": ">= 10" } }, + "node_modules/is-alphabetical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", + "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-alphanumerical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", + "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", + "dependencies": { + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/is-arguments": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", @@ -9675,6 +9882,28 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "engines": { + "node": ">=4" + } + }, "node_modules/is-callable": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", @@ -9711,6 +9940,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-decimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", + "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/is-docker": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", @@ -9760,6 +9998,15 @@ "node": ">=0.10.0" } }, + "node_modules/is-hexadecimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", + "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/is-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", @@ -12396,11 +12643,72 @@ "tmpl": "1.0.5" } }, + "node_modules/mdast-util-definitions": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-4.0.0.tgz", + "integrity": "sha512-k8AJ6aNnUkB7IE+5azR9h81O5EQ/cTDXtWdMq9Kk5KcEW/8ritU5CeLg/9HhOC++nALHBlaogJ5jz0Ybk3kPMQ==", + "dependencies": { + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-from-markdown": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-0.8.5.tgz", + "integrity": "sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==", + "dependencies": { + "@types/mdast": "^3.0.0", + "mdast-util-to-string": "^2.0.0", + "micromark": "~2.11.0", + "parse-entities": "^2.0.0", + "unist-util-stringify-position": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-hast": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-10.2.0.tgz", + "integrity": "sha512-JoPBfJ3gBnHZ18icCwHR50orC9kNH81tiR1gs01D8Q5YpV6adHNO9nKNuFBCJQ941/32PT1a63UF/DitmS3amQ==", + "dependencies": { + "@types/mdast": "^3.0.0", + "@types/unist": "^2.0.0", + "mdast-util-definitions": "^4.0.0", + "mdurl": "^1.0.0", + "unist-builder": "^2.0.0", + "unist-util-generated": "^1.0.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz", + "integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/mdn-data": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz", "integrity": "sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==" }, + "node_modules/mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==" + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -12446,6 +12754,25 @@ "node": ">= 0.6" } }, + "node_modules/micromark": { + "version": "2.11.4", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-2.11.4.tgz", + "integrity": "sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "debug": "^4.0.0", + "parse-entities": "^2.0.0" + } + }, "node_modules/micromatch": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", @@ -13080,6 +13407,23 @@ "node": ">=6" } }, + "node_modules/parse-entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", + "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", + "dependencies": { + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -14543,6 +14887,18 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, + "node_modules/property-information": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-5.6.0.tgz", + "integrity": "sha512-YUHSPk+A30YPv+0Qf8i9Mbfe/C0hdPXk1s1jPVToV8pk8BQtpw10ct89Eo7OWkutrwqvT0eicAxlOg3dOAu8JA==", + "dependencies": { + "xtend": "^4.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/protobufjs": { "version": "6.11.3", "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.3.tgz", @@ -15025,6 +15381,34 @@ "react-dom": "*" } }, + "node_modules/react-markdown": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/react-markdown/-/react-markdown-6.0.3.tgz", + "integrity": "sha512-kQbpWiMoBHnj9myLlmZG9T1JdoT/OEyHK7hqM6CqFT14MAkgWiWBUYijLyBmxbntaN6dCDicPcUhWhci1QYodg==", + "dependencies": { + "@types/hast": "^2.0.0", + "@types/unist": "^2.0.3", + "comma-separated-tokens": "^1.0.0", + "prop-types": "^15.7.2", + "property-information": "^5.3.0", + "react-is": "^17.0.0", + "remark-parse": "^9.0.0", + "remark-rehype": "^8.0.0", + "space-separated-tokens": "^1.1.0", + "style-to-object": "^0.3.0", + "unified": "^9.0.0", + "unist-util-visit": "^2.0.0", + "vfile": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + }, + "peerDependencies": { + "@types/react": ">=16", + "react": ">=16" + } + }, "node_modules/react-quill": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/react-quill/-/react-quill-1.3.5.tgz", @@ -15354,6 +15738,18 @@ "jsesc": "bin/jsesc" } }, + "node_modules/rehype-raw": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/rehype-raw/-/rehype-raw-5.1.0.tgz", + "integrity": "sha512-MDvHAb/5mUnif2R+0IPCYJU8WjHa9UzGtM/F4AVy5GixPlDZ1z3HacYy4xojDU+uBa+0X/3PIfyQI26/2ljJNA==", + "dependencies": { + "hast-util-raw": "^6.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/relateurl": { "version": "0.2.7", "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", @@ -15362,6 +15758,30 @@ "node": ">= 0.10" } }, + "node_modules/remark-parse": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-9.0.0.tgz", + "integrity": "sha512-geKatMwSzEXKHuzBNU1z676sGcDcFoChMK38TgdHJNAYfFtsfHDQG7MoJAjs6sgYMqyLduCYWDIWZIxiPeafEw==", + "dependencies": { + "mdast-util-from-markdown": "^0.8.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-rehype": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-8.1.0.tgz", + "integrity": "sha512-EbCu9kHgAxKmW1yEYjx3QafMyGY3q8noUbNUI5xyKbaFP89wbhDrKxyIQNukNYthzjNHZu6J7hwFg7hRm1svYA==", + "dependencies": { + "mdast-util-to-hast": "^10.2.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/renderkid": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-3.0.0.tgz", @@ -16023,6 +16443,15 @@ "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==" }, + "node_modules/space-separated-tokens": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz", + "integrity": "sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/spdy": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz", @@ -16278,6 +16707,14 @@ "webpack": "^5.0.0" } }, + "node_modules/style-to-object": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.3.0.tgz", + "integrity": "sha512-CzFnRRXhzWIdItT3OmF8SQfWyahHhjq3HwcMNCNLn+N7klOOqPjMeG/4JSu77D7ypZdGvSzvkrbyeTMizz2VrA==", + "dependencies": { + "inline-style-parser": "0.1.1" + } + }, "node_modules/styled-components": { "version": "5.3.5", "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-5.3.5.tgz", @@ -16879,6 +17316,15 @@ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" }, + "node_modules/trough": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/trough/-/trough-1.0.5.tgz", + "integrity": "sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/tryer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz", @@ -17043,6 +17489,31 @@ "node": ">=4" } }, + "node_modules/unified": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.2.tgz", + "integrity": "sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ==", + "dependencies": { + "bail": "^1.0.0", + "extend": "^3.0.0", + "is-buffer": "^2.0.0", + "is-plain-obj": "^2.0.0", + "trough": "^1.0.0", + "vfile": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unified/node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "engines": { + "node": ">=8" + } + }, "node_modules/unique-string": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", @@ -17054,6 +17525,81 @@ "node": ">=8" } }, + "node_modules/unist-builder": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-builder/-/unist-builder-2.0.3.tgz", + "integrity": "sha512-f98yt5pnlMWlzP539tPc4grGMsFaQQlP/vM396b00jngsiINumNmsY8rkXjfoi1c6QaM8nQ3vaGDuoKWbe/1Uw==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-generated": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-1.1.6.tgz", + "integrity": "sha512-cln2Mm1/CZzN5ttGK7vkoGw+RZ8VcUH6BtGbq98DDtRGquAAOXig1mrBQYelOwMXYS8rK+vZDyyojSjp7JX+Lg==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-is": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.1.0.tgz", + "integrity": "sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-position": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-3.1.0.tgz", + "integrity": "sha512-w+PkwCbYSFw8vpgWD0v7zRCl1FpY3fjDSQ3/N/wNd9Ffa4gPi8+4keqt99N3XW6F99t/mUzp2xAhNmfKWp95QA==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-stringify-position": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", + "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", + "dependencies": { + "@types/unist": "^2.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.3.tgz", + "integrity": "sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q==", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit-parents": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.1.1.tgz", + "integrity": "sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg==", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", @@ -17183,6 +17729,43 @@ "node": ">= 0.8" } }, + "node_modules/vfile": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz", + "integrity": "sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==", + "dependencies": { + "@types/unist": "^2.0.0", + "is-buffer": "^2.0.0", + "unist-util-stringify-position": "^2.0.0", + "vfile-message": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-location": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-3.2.0.tgz", + "integrity": "sha512-aLEIZKv/oxuCDZ8lkJGhuhztf/BW4M+iHdCwglA/eWc+vtuRFJj8EtgceYFX4LRjOhCAAiNHsKGssC6onJ+jbA==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-message": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.4.tgz", + "integrity": "sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ==", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-stringify-position": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/w3c-hr-time": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", @@ -17230,6 +17813,15 @@ "minimalistic-assert": "^1.0.0" } }, + "node_modules/web-namespaces": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-1.1.4.tgz", + "integrity": "sha512-wYxSGajtmoP4WxfejAPIr4l0fVh+jeMXZb08wNc0tMg6xsfZXj3cECqIK0G7ZAqUq0PP8WlMDtaOGVBTAWztNw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/web-vitals": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-2.1.4.tgz", @@ -18131,6 +18723,15 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } + }, + "node_modules/zwitch": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz", + "integrity": "sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } } }, "dependencies": { @@ -21167,6 +21768,14 @@ "@types/node": "*" } }, + "@types/hast": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.4.tgz", + "integrity": "sha512-wLEm0QvaoawEDoTRwzTXp4b4jpwiJDvR5KMnFnVodm3scufTlBOWRD6N1OBf9TZMhjlNsSfcO5V+7AF4+Vy+9g==", + "requires": { + "@types/unist": "*" + } + }, "@types/html-minifier-terser": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz", @@ -21216,6 +21825,14 @@ "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" }, + "@types/mdast": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.10.tgz", + "integrity": "sha512-W864tg/Osz1+9f4lrGTZpCSO5/z4608eUp19tbozkq2HJK6i3z1kT0H9tlADXuYIb1YYOBByU4Jsqkk75q48qA==", + "requires": { + "@types/unist": "*" + } + }, "@types/mime": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", @@ -21231,6 +21848,11 @@ "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==" }, + "@types/parse5": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-5.0.3.tgz", + "integrity": "sha512-kUNnecmtkunAoQ3CnjmMkzNU/gtxG8guhi+Fk2U/kOpIKjIMKnXGp4IJCgQJrXSgMsWYimYG4TGjz/UzbGEBTw==" + }, "@types/prettier": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.6.1.tgz", @@ -21343,6 +21965,11 @@ "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.2.tgz", "integrity": "sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==" }, + "@types/unist": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz", + "integrity": "sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==" + }, "@types/ws": { "version": "8.5.3", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz", @@ -22181,6 +22808,11 @@ } } }, + "bail": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz", + "integrity": "sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ==" + }, "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -22426,6 +23058,21 @@ "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==" }, + "character-entities": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", + "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==" + }, + "character-entities-legacy": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", + "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==" + }, + "character-reference-invalid": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", + "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==" + }, "charcodes": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/charcodes/-/charcodes-0.2.0.tgz", @@ -22567,6 +23214,11 @@ "delayed-stream": "~1.0.0" } }, + "comma-separated-tokens": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz", + "integrity": "sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw==" + }, "commander": { "version": "8.3.0", "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", @@ -24708,6 +25360,80 @@ "has-symbols": "^1.0.2" } }, + "hast-to-hyperscript": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/hast-to-hyperscript/-/hast-to-hyperscript-9.0.1.tgz", + "integrity": "sha512-zQgLKqF+O2F72S1aa4y2ivxzSlko3MAvxkwG8ehGmNiqd98BIN3JM1rAJPmplEyLmGLO2QZYJtIneOSZ2YbJuA==", + "requires": { + "@types/unist": "^2.0.3", + "comma-separated-tokens": "^1.0.0", + "property-information": "^5.3.0", + "space-separated-tokens": "^1.0.0", + "style-to-object": "^0.3.0", + "unist-util-is": "^4.0.0", + "web-namespaces": "^1.0.0" + } + }, + "hast-util-from-parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-6.0.1.tgz", + "integrity": "sha512-jeJUWiN5pSxW12Rh01smtVkZgZr33wBokLzKLwinYOUfSzm1Nl/c3GUGebDyOKjdsRgMvoVbV0VpAcpjF4NrJA==", + "requires": { + "@types/parse5": "^5.0.0", + "hastscript": "^6.0.0", + "property-information": "^5.0.0", + "vfile": "^4.0.0", + "vfile-location": "^3.2.0", + "web-namespaces": "^1.0.0" + } + }, + "hast-util-parse-selector": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz", + "integrity": "sha512-7j6mrk/qqkSehsM92wQjdIgWM2/BW61u/53G6xmC8i1OmEdKLHbk419QKQUjz6LglWsfqoiHmyMRkP1BGjecNQ==" + }, + "hast-util-raw": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-6.1.0.tgz", + "integrity": "sha512-5FoZLDHBpka20OlZZ4I/+RBw5piVQ8iI1doEvffQhx5CbCyTtP8UCq8Tw6NmTAMtXgsQxmhW7Ly8OdFre5/YMQ==", + "requires": { + "@types/hast": "^2.0.0", + "hast-util-from-parse5": "^6.0.0", + "hast-util-to-parse5": "^6.0.0", + "html-void-elements": "^1.0.0", + "parse5": "^6.0.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0", + "vfile": "^4.0.0", + "web-namespaces": "^1.0.0", + "xtend": "^4.0.0", + "zwitch": "^1.0.0" + } + }, + "hast-util-to-parse5": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-6.0.0.tgz", + "integrity": "sha512-Lu5m6Lgm/fWuz8eWnrKezHtVY83JeRGaNQ2kn9aJgqaxvVkFCZQBEhgodZUDUvoodgyROHDb3r5IxAEdl6suJQ==", + "requires": { + "hast-to-hyperscript": "^9.0.0", + "property-information": "^5.0.0", + "web-namespaces": "^1.0.0", + "xtend": "^4.0.0", + "zwitch": "^1.0.0" + } + }, + "hastscript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-6.0.0.tgz", + "integrity": "sha512-nDM6bvd7lIqDUiYEiu5Sl/+6ReP0BMk/2f4U/Rooccxkj0P5nm+acM5PrGJ/t5I8qPGiqZSE6hVAwZEdZIvP4w==", + "requires": { + "@types/hast": "^2.0.0", + "comma-separated-tokens": "^1.0.0", + "hast-util-parse-selector": "^2.0.0", + "property-information": "^5.0.0", + "space-separated-tokens": "^1.0.0" + } + }, "he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -24829,6 +25555,11 @@ "minimist": "^1.2.5" } }, + "html-void-elements": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-1.0.5.tgz", + "integrity": "sha512-uE/TxKuyNIcx44cIWnjr/rfIATDH7ZaOMmstu0CwhFG1Dunhlp4OC6/NMbhiwoq5BpW0ubi303qnEk/PZj614w==" + }, "html-webpack-plugin": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-5.5.0.tgz", @@ -25006,6 +25737,11 @@ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" }, + "inline-style-parser": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.1.1.tgz", + "integrity": "sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==" + }, "internal-slot": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", @@ -25021,6 +25757,20 @@ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.0.1.tgz", "integrity": "sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng==" }, + "is-alphabetical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", + "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==" + }, + "is-alphanumerical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", + "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", + "requires": { + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0" + } + }, "is-arguments": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", @@ -25060,6 +25810,11 @@ "has-tostringtag": "^1.0.0" } }, + "is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==" + }, "is-callable": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", @@ -25081,6 +25836,11 @@ "has-tostringtag": "^1.0.0" } }, + "is-decimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", + "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==" + }, "is-docker": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", @@ -25109,6 +25869,11 @@ "is-extglob": "^2.1.1" } }, + "is-hexadecimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", + "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==" + }, "is-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", @@ -27046,11 +27811,56 @@ "tmpl": "1.0.5" } }, + "mdast-util-definitions": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-4.0.0.tgz", + "integrity": "sha512-k8AJ6aNnUkB7IE+5azR9h81O5EQ/cTDXtWdMq9Kk5KcEW/8ritU5CeLg/9HhOC++nALHBlaogJ5jz0Ybk3kPMQ==", + "requires": { + "unist-util-visit": "^2.0.0" + } + }, + "mdast-util-from-markdown": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-0.8.5.tgz", + "integrity": "sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==", + "requires": { + "@types/mdast": "^3.0.0", + "mdast-util-to-string": "^2.0.0", + "micromark": "~2.11.0", + "parse-entities": "^2.0.0", + "unist-util-stringify-position": "^2.0.0" + } + }, + "mdast-util-to-hast": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-10.2.0.tgz", + "integrity": "sha512-JoPBfJ3gBnHZ18icCwHR50orC9kNH81tiR1gs01D8Q5YpV6adHNO9nKNuFBCJQ941/32PT1a63UF/DitmS3amQ==", + "requires": { + "@types/mdast": "^3.0.0", + "@types/unist": "^2.0.0", + "mdast-util-definitions": "^4.0.0", + "mdurl": "^1.0.0", + "unist-builder": "^2.0.0", + "unist-util-generated": "^1.0.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + } + }, + "mdast-util-to-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz", + "integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==" + }, "mdn-data": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz", "integrity": "sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==" }, + "mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==" + }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -27084,6 +27894,15 @@ "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" }, + "micromark": { + "version": "2.11.4", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-2.11.4.tgz", + "integrity": "sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==", + "requires": { + "debug": "^4.0.0", + "parse-entities": "^2.0.0" + } + }, "micromatch": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", @@ -27520,6 +28339,19 @@ "callsites": "^3.0.0" } }, + "parse-entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", + "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", + "requires": { + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" + } + }, "parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -28439,6 +29271,14 @@ } } }, + "property-information": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-5.6.0.tgz", + "integrity": "sha512-YUHSPk+A30YPv+0Qf8i9Mbfe/C0hdPXk1s1jPVToV8pk8BQtpw10ct89Eo7OWkutrwqvT0eicAxlOg3dOAu8JA==", + "requires": { + "xtend": "^4.0.0" + } + }, "protobufjs": { "version": "6.11.3", "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.3.tgz", @@ -28811,6 +29651,26 @@ "prop-types": "^15.7.2" } }, + "react-markdown": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/react-markdown/-/react-markdown-6.0.3.tgz", + "integrity": "sha512-kQbpWiMoBHnj9myLlmZG9T1JdoT/OEyHK7hqM6CqFT14MAkgWiWBUYijLyBmxbntaN6dCDicPcUhWhci1QYodg==", + "requires": { + "@types/hast": "^2.0.0", + "@types/unist": "^2.0.3", + "comma-separated-tokens": "^1.0.0", + "prop-types": "^15.7.2", + "property-information": "^5.3.0", + "react-is": "^17.0.0", + "remark-parse": "^9.0.0", + "remark-rehype": "^8.0.0", + "space-separated-tokens": "^1.1.0", + "style-to-object": "^0.3.0", + "unified": "^9.0.0", + "unist-util-visit": "^2.0.0", + "vfile": "^4.0.0" + } + }, "react-quill": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/react-quill/-/react-quill-1.3.5.tgz", @@ -29070,11 +29930,35 @@ } } }, + "rehype-raw": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/rehype-raw/-/rehype-raw-5.1.0.tgz", + "integrity": "sha512-MDvHAb/5mUnif2R+0IPCYJU8WjHa9UzGtM/F4AVy5GixPlDZ1z3HacYy4xojDU+uBa+0X/3PIfyQI26/2ljJNA==", + "requires": { + "hast-util-raw": "^6.1.0" + } + }, "relateurl": { "version": "0.2.7", "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=" }, + "remark-parse": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-9.0.0.tgz", + "integrity": "sha512-geKatMwSzEXKHuzBNU1z676sGcDcFoChMK38TgdHJNAYfFtsfHDQG7MoJAjs6sgYMqyLduCYWDIWZIxiPeafEw==", + "requires": { + "mdast-util-from-markdown": "^0.8.0" + } + }, + "remark-rehype": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-8.1.0.tgz", + "integrity": "sha512-EbCu9kHgAxKmW1yEYjx3QafMyGY3q8noUbNUI5xyKbaFP89wbhDrKxyIQNukNYthzjNHZu6J7hwFg7hRm1svYA==", + "requires": { + "mdast-util-to-hast": "^10.2.0" + } + }, "renderkid": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-3.0.0.tgz", @@ -29560,6 +30444,11 @@ "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==" }, + "space-separated-tokens": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz", + "integrity": "sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA==" + }, "spdy": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz", @@ -29750,6 +30639,14 @@ "integrity": "sha512-GPcQ+LDJbrcxHORTRes6Jy2sfvK2kS6hpSfI/fXhPt+spVzxF6LJ1dHLN9zIGmVaaP044YKaIatFaufENRiDoQ==", "requires": {} }, + "style-to-object": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.3.0.tgz", + "integrity": "sha512-CzFnRRXhzWIdItT3OmF8SQfWyahHhjq3HwcMNCNLn+N7klOOqPjMeG/4JSu77D7ypZdGvSzvkrbyeTMizz2VrA==", + "requires": { + "inline-style-parser": "0.1.1" + } + }, "styled-components": { "version": "5.3.5", "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-5.3.5.tgz", @@ -30200,6 +31097,11 @@ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" }, + "trough": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/trough/-/trough-1.0.5.tgz", + "integrity": "sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==" + }, "tryer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz", @@ -30326,6 +31228,26 @@ "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==" }, + "unified": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.2.tgz", + "integrity": "sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ==", + "requires": { + "bail": "^1.0.0", + "extend": "^3.0.0", + "is-buffer": "^2.0.0", + "is-plain-obj": "^2.0.0", + "trough": "^1.0.0", + "vfile": "^4.0.0" + }, + "dependencies": { + "is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==" + } + } + }, "unique-string": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", @@ -30334,6 +31256,53 @@ "crypto-random-string": "^2.0.0" } }, + "unist-builder": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-builder/-/unist-builder-2.0.3.tgz", + "integrity": "sha512-f98yt5pnlMWlzP539tPc4grGMsFaQQlP/vM396b00jngsiINumNmsY8rkXjfoi1c6QaM8nQ3vaGDuoKWbe/1Uw==" + }, + "unist-util-generated": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-1.1.6.tgz", + "integrity": "sha512-cln2Mm1/CZzN5ttGK7vkoGw+RZ8VcUH6BtGbq98DDtRGquAAOXig1mrBQYelOwMXYS8rK+vZDyyojSjp7JX+Lg==" + }, + "unist-util-is": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.1.0.tgz", + "integrity": "sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==" + }, + "unist-util-position": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-3.1.0.tgz", + "integrity": "sha512-w+PkwCbYSFw8vpgWD0v7zRCl1FpY3fjDSQ3/N/wNd9Ffa4gPi8+4keqt99N3XW6F99t/mUzp2xAhNmfKWp95QA==" + }, + "unist-util-stringify-position": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", + "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", + "requires": { + "@types/unist": "^2.0.2" + } + }, + "unist-util-visit": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.3.tgz", + "integrity": "sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.1.1.tgz", + "integrity": "sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + }, "universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", @@ -30433,6 +31402,31 @@ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" }, + "vfile": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz", + "integrity": "sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==", + "requires": { + "@types/unist": "^2.0.0", + "is-buffer": "^2.0.0", + "unist-util-stringify-position": "^2.0.0", + "vfile-message": "^2.0.0" + } + }, + "vfile-location": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-3.2.0.tgz", + "integrity": "sha512-aLEIZKv/oxuCDZ8lkJGhuhztf/BW4M+iHdCwglA/eWc+vtuRFJj8EtgceYFX4LRjOhCAAiNHsKGssC6onJ+jbA==" + }, + "vfile-message": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.4.tgz", + "integrity": "sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-stringify-position": "^2.0.0" + } + }, "w3c-hr-time": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", @@ -30474,6 +31468,11 @@ "minimalistic-assert": "^1.0.0" } }, + "web-namespaces": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-1.1.4.tgz", + "integrity": "sha512-wYxSGajtmoP4WxfejAPIr4l0fVh+jeMXZb08wNc0tMg6xsfZXj3cECqIK0G7ZAqUq0PP8WlMDtaOGVBTAWztNw==" + }, "web-vitals": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-2.1.4.tgz", @@ -31192,6 +32191,11 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==" + }, + "zwitch": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz", + "integrity": "sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==" } } } diff --git a/package.json b/package.json index 89dcbf9..329df55 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,8 @@ "react-icons": "^4.3.1", "react-loader-spinner": "^4.0.0", "react-router-dom": "^5.2.0", + "react-markdown": "^6.0.3", + "rehype-raw": "^5.1.0", "react-scripts": "5.0.0", "styled-components": "^5.3.5", "uuid": "^8.3.2", diff --git a/src/components/details/BannerInfo.js b/src/components/details/BannerInfo.js index 63d6242..88666df 100644 --- a/src/components/details/BannerInfo.js +++ b/src/components/details/BannerInfo.js @@ -5,8 +5,6 @@ import { useHistory } from 'react-router-dom'; import { AiFillStar } from 'react-icons/ai'; import { BiListPlus } from 'react-icons/bi'; -import { GrFacebook, GrInstagram, GrTwitter } from 'react-icons/gr'; -import { FaImdb } from 'react-icons/fa'; import UserContext from '../../context/user'; import { updateProfileWatchlist } from '../../services/firebase'; @@ -14,6 +12,7 @@ import { img300, img500, unavailable } from '../../helpers/config'; import formatTime from '../../helpers/formatTime'; import voteColor from '../../helpers/voteColor'; import { LOGIN } from '../../constants/routes'; +import SocialLinks from '../widget/SocialLinks'; const BannerInfo = ({ content, type, runtime }) => { const { user } = useContext(UserContext); @@ -94,47 +93,12 @@ const BannerInfo = ({ content, type, runtime }) => { {content.overview}

-
- {content?.external_ids?.facebook_id && ( - - - - )} - - {content?.external_ids?.instagram_id && ( - - - - )} - - {content?.external_ids?.twitter_id && ( - - - - )} - - {content?.external_ids?.imdb_id && ( - - - - )} -
+ { diff --git a/src/components/person/DetailCard.js b/src/components/person/DetailCard.js index 0479fca..8d957b9 100644 --- a/src/components/person/DetailCard.js +++ b/src/components/person/DetailCard.js @@ -55,7 +55,7 @@ const DetailCard = ({ creditData }) => { )} {also_known_as && also_known_as.length > 0 && (
-

+

Also Known As :
{also_known_as.map((name, index) => ( @@ -65,7 +65,7 @@ const DetailCard = ({ creditData }) => {
))}
-

+
)} diff --git a/src/components/person/PersonIntro.js b/src/components/person/PersonIntro.js index a276996..5531411 100644 --- a/src/components/person/PersonIntro.js +++ b/src/components/person/PersonIntro.js @@ -1,4 +1,6 @@ import React from 'react'; +import rehypeRaw from 'rehype-raw'; +import ReactMarkdown from 'react-markdown'; import { img500 } from '../../helpers/config'; const PersonIntro = ({ creditData }) => { @@ -18,10 +20,14 @@ const PersonIntro = ({ creditData }) => { {creditData?.name}

Biography

-

+ +

+ +
); From d5493c679a3825789310191e1b314ab33e15266a Mon Sep 17 00:00:00 2001 From: Mridul2820 Date: Wed, 1 Jun 2022 19:27:17 +0530 Subject: [PATCH 05/24] show persons movie --- src/components/cards/MovieSeries.js | 13 +++++++++++-- src/components/person/PersonGallery.js | 7 +++++++ src/components/person/PersonMovies.js | 12 ++++++++++++ src/components/person/PresonTabs.js | 14 ++++++++++++++ src/components/widget/ContentGrid.js | 3 +++ src/pages/withid/PersonDetail.js | 2 ++ 6 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 src/components/person/PersonGallery.js create mode 100644 src/components/person/PersonMovies.js create mode 100644 src/components/person/PresonTabs.js diff --git a/src/components/cards/MovieSeries.js b/src/components/cards/MovieSeries.js index 7b371c6..f1cbf0b 100644 --- a/src/components/cards/MovieSeries.js +++ b/src/components/cards/MovieSeries.js @@ -31,6 +31,8 @@ const MovieSeries = ({ showWatch, samepage, nohover, + character, + showCredit, }) => { const { user } = useContext(UserContext); const history = useHistory(); @@ -62,6 +64,12 @@ const MovieSeries = ({ {media_type === 'movie' ? 'Movie' : 'TV Series'} •{' '} {date ? new Date(date).getFullYear() : ' '} + {showCredit && character && ( +

+ As + {character}{' '} +

+ )} ); @@ -95,9 +103,10 @@ const MovieSeries = ({ )} - -

{truncate(description, 35)}

+ {!showCredit && ( +

{truncate(description, 35)}

+ )} {showWatch && !nohover && ( { diff --git a/src/components/person/PersonGallery.js b/src/components/person/PersonGallery.js new file mode 100644 index 0000000..32e3128 --- /dev/null +++ b/src/components/person/PersonGallery.js @@ -0,0 +1,7 @@ +import React from 'react'; + +const PersonGallery = ({ images }) => { + return
; +}; + +export default PersonGallery; diff --git a/src/components/person/PersonMovies.js b/src/components/person/PersonMovies.js new file mode 100644 index 0000000..10d904d --- /dev/null +++ b/src/components/person/PersonMovies.js @@ -0,0 +1,12 @@ +import React from 'react'; +import ContentGrid from '../widget/ContentGrid'; + +const PersonMovies = ({ credits }) => { + return ( +
+ +
+ ); +}; + +export default PersonMovies; diff --git a/src/components/person/PresonTabs.js b/src/components/person/PresonTabs.js new file mode 100644 index 0000000..ddf4d77 --- /dev/null +++ b/src/components/person/PresonTabs.js @@ -0,0 +1,14 @@ +import React from 'react'; +import PersonGallery from './PersonGallery'; +import PersonMovies from './PersonMovies'; + +const PresonTabs = ({ creditData }) => { + return ( +
+ + +
+ ); +}; + +export default PresonTabs; diff --git a/src/components/widget/ContentGrid.js b/src/components/widget/ContentGrid.js index 9d54b9b..932a64d 100644 --- a/src/components/widget/ContentGrid.js +++ b/src/components/widget/ContentGrid.js @@ -8,6 +8,7 @@ const ContentGrid = ({ samepage, nohover, showWatch = true, + showCredit = false, }) => { return ( @@ -26,6 +27,8 @@ const ContentGrid = ({ showWatch={showWatch} samepage={samepage} nohover={nohover} + showCredit={showCredit} + character={item.character} /> ))} diff --git a/src/pages/withid/PersonDetail.js b/src/pages/withid/PersonDetail.js index d3e4fd7..c6c6430 100644 --- a/src/pages/withid/PersonDetail.js +++ b/src/pages/withid/PersonDetail.js @@ -4,6 +4,7 @@ import Loader from 'react-loader-spinner'; import { useParams } from 'react-router-dom'; import DetailCard from '../../components/person/DetailCard'; import PersonIntro from '../../components/person/PersonIntro'; +import PresonTabs from '../../components/person/PresonTabs'; import { API_URL, BASE_URL } from '../../constants/constant'; import { Container } from '../../styles/Styles'; @@ -54,6 +55,7 @@ const PersonDetail = () => {
{creditData && } + {creditData && }
); From 5cfda6b63a92f2045962509f6848be2ecb58d1ec Mon Sep 17 00:00:00 2001 From: Mridul2820 Date: Wed, 1 Jun 2022 19:51:36 +0530 Subject: [PATCH 06/24] person gallery add --- src/components/cards/MovieSeries.js | 2 +- src/components/person/DetailCard.js | 2 +- src/components/person/PersonGallery.js | 32 ++++++++++++++- src/components/person/PresonTabs.js | 54 ++++++++++++++++++++++++-- src/components/widget/ContentGrid.js | 4 +- src/styles/index.css | 4 ++ 6 files changed, 88 insertions(+), 10 deletions(-) diff --git a/src/components/cards/MovieSeries.js b/src/components/cards/MovieSeries.js index f1cbf0b..eac5a1a 100644 --- a/src/components/cards/MovieSeries.js +++ b/src/components/cards/MovieSeries.js @@ -65,7 +65,7 @@ const MovieSeries = ({ {date ? new Date(date).getFullYear() : ' '} {showCredit && character && ( -

+

As {character}{' '}

diff --git a/src/components/person/DetailCard.js b/src/components/person/DetailCard.js index 8d957b9..85363dc 100644 --- a/src/components/person/DetailCard.js +++ b/src/components/person/DetailCard.js @@ -41,7 +41,7 @@ const DetailCard = ({ creditData }) => {

Age : - {getAge(birthday)} + {getAge(birthday)} Years

)} diff --git a/src/components/person/PersonGallery.js b/src/components/person/PersonGallery.js index 32e3128..5f400ce 100644 --- a/src/components/person/PersonGallery.js +++ b/src/components/person/PersonGallery.js @@ -1,7 +1,35 @@ import React from 'react'; +import { img500 } from '../../helpers/config'; -const PersonGallery = ({ images }) => { - return
; +const PersonGallery = ({ images, defaultImage, alt }) => { + return ( +
+ {images.profiles ? ( +
+ {images.profiles.length > 0 ? ( + images.profiles.map((photo, index) => ( + {alt} + )) + ) : ( + {alt} + )} +
+ ) : ( +

No Photo Found

+ )} +
+ ); }; export default PersonGallery; diff --git a/src/components/person/PresonTabs.js b/src/components/person/PresonTabs.js index ddf4d77..1a79da0 100644 --- a/src/components/person/PresonTabs.js +++ b/src/components/person/PresonTabs.js @@ -1,14 +1,60 @@ -import React from 'react'; +import React, { useState } from 'react'; import PersonGallery from './PersonGallery'; import PersonMovies from './PersonMovies'; +import styled from 'styled-components'; const PresonTabs = ({ creditData }) => { + // Tabs + const [active, setActive] = useState(0); + + const handleClick = (e) => { + const index = parseInt(e.target.id, 0); + if (index !== active) { + setActive(index); + } + }; + return ( -
- - +
+
+ + Movies & TV Series + + + Gallery + +
+ {active === 0 && } + {active === 1 && ( + + )}
); }; +const Tab = styled.div` + width: 20%; + padding: 10px 5px; + border: ${(props) => + props.active ? '2px solid rgb(96, 165, 250)' : '2px solid transparent'}; + opacity: ${(props) => (props.active ? '1' : '.8')}; + background-color: ${(props) => + props.active ? 'white' : 'rgb(195, 221, 253)'}; + transition: background-color 0.5s ease-in-out; +`; + export default PresonTabs; diff --git a/src/components/widget/ContentGrid.js b/src/components/widget/ContentGrid.js index 932a64d..b0fcfb5 100644 --- a/src/components/widget/ContentGrid.js +++ b/src/components/widget/ContentGrid.js @@ -13,9 +13,9 @@ const ContentGrid = ({ return ( {items && - items.map((item) => ( + items.map((item, index) => ( Date: Wed, 1 Jun 2022 20:05:04 +0530 Subject: [PATCH 07/24] uuid use in all maps --- src/components/cards/WatchItem.js | 1 - src/components/details/BannerInfo.js | 3 ++- src/components/details/CastnCrew.js | 3 ++- src/components/details/FactBox.js | 13 +++++++------ src/components/details/Gallery.js | 13 +++++++------ src/components/details/Trailers.js | 3 ++- src/components/footer/FooterMenu.js | 5 +++-- src/components/options/Options.js | 5 +++-- src/components/person/DetailCard.js | 3 ++- src/components/person/PersonGallery.js | 5 +++-- src/components/widget/ContentGrid.js | 5 +++-- src/components/widget/GenresChip.js | 5 +++-- src/pages/Dashboard.js | 3 ++- src/pages/topic/Genres.js | 3 ++- 14 files changed, 41 insertions(+), 29 deletions(-) diff --git a/src/components/cards/WatchItem.js b/src/components/cards/WatchItem.js index 3faec77..291bd4b 100644 --- a/src/components/cards/WatchItem.js +++ b/src/components/cards/WatchItem.js @@ -27,7 +27,6 @@ const WatchItem = ({ id, type }) => {
{content && ( {
{content.genres?.map((genre) => (
diff --git a/src/components/details/CastnCrew.js b/src/components/details/CastnCrew.js index fbd2715..f0f8ba2 100644 --- a/src/components/details/CastnCrew.js +++ b/src/components/details/CastnCrew.js @@ -1,5 +1,6 @@ import React from 'react'; import styled from 'styled-components'; +import { v4 as uuidv4 } from 'uuid'; import { img200, noUserImg } from '../../helpers/config'; const CastnCrew = ({ credits, title }) => { @@ -9,7 +10,7 @@ const CastnCrew = ({ credits, title }) => { {credits && credits.length > 0 ? (
{credits.map((credit) => ( - +
Director : {getDirector(crew).map((producer) => ( -
+
Producer : {getProducer(crew).map((producer) => ( -
+
{seasons.map((season) => (
@@ -250,7 +251,7 @@ const FactBox = ({
{keywords.map((keyword) => ( {keyword.name} diff --git a/src/components/details/Gallery.js b/src/components/details/Gallery.js index 7247e6d..e1509c5 100644 --- a/src/components/details/Gallery.js +++ b/src/components/details/Gallery.js @@ -1,5 +1,6 @@ import React, { useState } from 'react'; import styled from 'styled-components'; +import { v4 as uuidv4 } from 'uuid'; import { img500 } from '../../helpers/config'; const Gallery = ({ title, photos, backdrop_path, poster_path }) => { @@ -59,9 +60,9 @@ const Gallery = ({ title, photos, backdrop_path, poster_path }) => { (photos?.backdrops?.length > 0 || backdrop_path) && ( <> {photos.backdrops.length > 0 ? ( - photos.backdrops.map((photo, index) => ( + photos.backdrops.map((photo) => ( {photo.title} { )} {active === 1 && photos?.logos?.length > 0 && - photos.logos.map((photo, index) => ( + photos.logos.map((photo) => ( {photo.title} { {active === 2 && (photos?.posters?.length > 0 || poster_path) && ( <> {photos.posters.length > 0 ? ( - photos.posters.map((photo, index) => ( + photos.posters.map((photo) => ( {photo.title} { return ( @@ -10,7 +11,7 @@ const Trailers = ({ videos, title }) => { videos.map((video) => (

diff --git a/src/components/footer/FooterMenu.js b/src/components/footer/FooterMenu.js index 477af82..c779f9d 100644 --- a/src/components/footer/FooterMenu.js +++ b/src/components/footer/FooterMenu.js @@ -1,5 +1,6 @@ import React, { useContext } from 'react'; import { Link } from 'react-router-dom'; +import { v4 as uuidv4 } from 'uuid'; import * as ROUTES from '../../constants/routes'; import { optionsMovie, optionsSeries, optionsAll } from '../../data/menuData'; @@ -10,10 +11,10 @@ const MenuRow = ({ title, items }) => { return (

{title}

- {items.map((item, index) => ( + {items.map((item) => ( {item.title} diff --git a/src/components/options/Options.js b/src/components/options/Options.js index 646c374..f882fb2 100644 --- a/src/components/options/Options.js +++ b/src/components/options/Options.js @@ -1,12 +1,13 @@ import React from 'react'; import styled from 'styled-components'; import { NavLink } from 'react-router-dom'; +import { v4 as uuidv4 } from 'uuid'; const Options = ({ options, colored }) => { return ( - {options.map((option, index) => ( - + {options.map((option) => ( + {option.activeIf ? ( { const { @@ -59,7 +60,7 @@ const DetailCard = ({ creditData }) => { Also Known As :
{also_known_as.map((name, index) => ( -
+

{index + 1}.

{name}
diff --git a/src/components/person/PersonGallery.js b/src/components/person/PersonGallery.js index 5f400ce..c306065 100644 --- a/src/components/person/PersonGallery.js +++ b/src/components/person/PersonGallery.js @@ -1,5 +1,6 @@ import React from 'react'; import { img500 } from '../../helpers/config'; +import { v4 as uuidv4 } from 'uuid'; const PersonGallery = ({ images, defaultImage, alt }) => { return ( @@ -7,9 +8,9 @@ const PersonGallery = ({ images, defaultImage, alt }) => { {images.profiles ? (
{images.profiles.length > 0 ? ( - images.profiles.map((photo, index) => ( + images.profiles.map((photo) => ( {alt} {items && - items.map((item, index) => ( + items.map((item) => ( ( ( { listWatch.length > 0 ? ( {listWatch.map((listwt) => ( - + ))} ) : ( diff --git a/src/pages/topic/Genres.js b/src/pages/topic/Genres.js index d82936d..161be3c 100644 --- a/src/pages/topic/Genres.js +++ b/src/pages/topic/Genres.js @@ -2,6 +2,7 @@ import React, { useEffect, useState } from 'react'; import { Link } from 'react-router-dom'; import axios from 'axios'; import DocumentMeta from 'react-document-meta'; +import { v4 as uuidv4 } from 'uuid'; import { PageTitle, Container } from '../../styles/Styles'; import styled from 'styled-components'; @@ -54,7 +55,7 @@ const GenresPage = () => { {genres.length > 0 && genres.map((genre) => ( {genre.name} From 4c380eb8fdbcb8899ee2edd0f534e5ba83ddff97 Mon Sep 17 00:00:00 2001 From: Mridul2820 Date: Wed, 1 Jun 2022 20:44:29 +0530 Subject: [PATCH 08/24] packages fix and uuid fix --- package.json | 4 ++-- src/components/person/PersonGallery.js | 20 ++++++++++++++------ src/components/widget/ContentGrid.js | 2 +- src/pages/topic/Genres.js | 2 +- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 329df55..a9c3c64 100644 --- a/package.json +++ b/package.json @@ -18,10 +18,10 @@ "react-dom": "^17.0.2", "react-icons": "^4.3.1", "react-loader-spinner": "^4.0.0", - "react-router-dom": "^5.2.0", "react-markdown": "^6.0.3", - "rehype-raw": "^5.1.0", + "react-router-dom": "^5.2.0", "react-scripts": "5.0.0", + "rehype-raw": "^5.1.0", "styled-components": "^5.3.5", "uuid": "^8.3.2", "web-vitals": "^2.1.2" diff --git a/src/components/person/PersonGallery.js b/src/components/person/PersonGallery.js index c306065..ab9d1c2 100644 --- a/src/components/person/PersonGallery.js +++ b/src/components/person/PersonGallery.js @@ -18,12 +18,20 @@ const PersonGallery = ({ images, defaultImage, alt }) => { /> )) ) : ( - {alt} + <> + {defaultImage ? ( + {alt} + ) : ( +

+ No Photo Found +

+ )} + )}
) : ( diff --git a/src/components/widget/ContentGrid.js b/src/components/widget/ContentGrid.js index 212a0e0..2ba7bd7 100644 --- a/src/components/widget/ContentGrid.js +++ b/src/components/widget/ContentGrid.js @@ -16,7 +16,7 @@ const ContentGrid = ({ {items && items.map((item) => ( { {genres.length > 0 && genres.map((genre) => ( {genre.name} From eeb44af0cd53dfb73a1b7ee560484cbcbb11ffb3 Mon Sep 17 00:00:00 2001 From: Mridul2820 Date: Wed, 1 Jun 2022 21:50:28 +0530 Subject: [PATCH 09/24] Date data update --- src/components/details/FactBox.js | 41 ++++++++++++++++------------- src/components/person/DetailCard.js | 19 +++++++++++-- src/helpers/dateData.js | 5 ++++ src/pages/withid/DetailsPage.js | 19 +------------ src/pages/withid/PersonDetail.js | 2 -- 5 files changed, 45 insertions(+), 41 deletions(-) create mode 100644 src/helpers/dateData.js diff --git a/src/components/details/FactBox.js b/src/components/details/FactBox.js index 0788c23..de949f1 100644 --- a/src/components/details/FactBox.js +++ b/src/components/details/FactBox.js @@ -6,25 +6,26 @@ import { getLangDetail } from '../../helpers/getLangDetail'; import CollectionData from './CollectionData'; // import WatchData from './WatchData'; import { v4 as uuidv4 } from 'uuid'; +import { dateData } from '../../helpers/dateData'; + +const FactBox = ({ content, type }) => { + const { + crew, + original_title, + status, + release, + lang, + runtime, + networks, + title, + seasons, + last_air_date, + first_air_date, + belongs_to_collection, + production_companies, + keywords, + } = content; -const FactBox = ({ - // id, - crew, - original_title, - status, - release, - lang, - runtime, - networks, - title, - seasons, - last_air_date, - first_air_date, - belongs_to_collection, - production_companies, - keywords, - type, -}) => { return (

Facts About {title}

@@ -107,7 +108,9 @@ const FactBox = ({

Release Date : - {release} + + {new Date(release).toLocaleDateString('en-US', dateData)} +

)} diff --git a/src/components/person/DetailCard.js b/src/components/person/DetailCard.js index 0ef2730..15c5611 100644 --- a/src/components/person/DetailCard.js +++ b/src/components/person/DetailCard.js @@ -2,15 +2,18 @@ import React from 'react'; import { getAge } from '../../helpers/getAge'; import SocialLinks from '../widget/SocialLinks'; import { v4 as uuidv4 } from 'uuid'; +import { dateData } from '../../helpers/dateData'; const DetailCard = ({ creditData }) => { const { external_ids, birthday, + deathday, place_of_birth, also_known_as, known_for_department, } = creditData; + return (
{ {birthday && (

- Birthday : - {birthday} + Born : + + {new Date(birthday).toLocaleDateString('en-US', dateData)} + +

+
+ )} + {deathday && ( +
+

+ Died : + + {new Date(deathday).toLocaleDateString('en-US', dateData)} +

)} diff --git a/src/helpers/dateData.js b/src/helpers/dateData.js new file mode 100644 index 0000000..15059ab --- /dev/null +++ b/src/helpers/dateData.js @@ -0,0 +1,5 @@ +export const dateData = { + day: 'numeric', + month: 'short', + year: 'numeric', +}; diff --git a/src/pages/withid/DetailsPage.js b/src/pages/withid/DetailsPage.js index ad4e078..f4fa603 100644 --- a/src/pages/withid/DetailsPage.js +++ b/src/pages/withid/DetailsPage.js @@ -165,24 +165,7 @@ const DetailsPage = () => { /> )} {active === 1 && content && ( - + )} {active === 2 && content && ( { const [creditData, setCreditData] = useState(); const [loading, setLoading] = useState(false); - console.log(creditData); - const fetchData = async () => { setLoading(true); const { data } = await axios( From 06f16e72ce5e1fa97f05d5241a498a8a947e3edb Mon Sep 17 00:00:00 2001 From: Mridul2820 Date: Thu, 2 Jun 2022 09:17:40 +0530 Subject: [PATCH 10/24] readme update --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d5f34fc..dc40a35 100644 --- a/README.md +++ b/README.md @@ -88,9 +88,9 @@ git clone https://github.com/Mridul2820/cineparadis.git REACT_APP_TMDB = REACT_APP_FIREBASE = ``` -- **```TMDB API KEY```: Get your `TMDB_API_KEY` by signing in to [TMDB](https://www.themoviedb.org/documentation/api) account.** +- **```TMDB API KEY```**: Get your **`TMDB_API_KEY`** by signing in to **[TMDB](https://www.themoviedb.org/documentation/api) account**. You can apply for an API key by clicking the **"API"** link from the left hand sidebar within your account settings page. You need to have a legitimate business **name, address, phone number and description** to apply for an API key. -- ```FIREBASE TOKEN```: Go to **[Firebase](https://firebase.google.com/)** and navigate to **Firebase Console**. You need to **Sign Up with you Gmail.** +- **```FIREBASE TOKEN```**: Go to **[Firebase](https://firebase.google.com/)** and navigate to **Firebase Console**. You need to **Sign Up with you Gmail.** Create an App and get your `Firebase Token`. You Also need to **enable Google Sign In** in the **Sign-in methods**. Enable **Firestore** in the Firebase Console and Create a Collection called ```users```. From 58105cdda1115ea688bf2bddb9c76d65ce039901 Mon Sep 17 00:00:00 2001 From: Mridul2820 Date: Thu, 2 Jun 2022 10:56:35 +0530 Subject: [PATCH 11/24] paginate person movies --- src/components/person/PersonMovies.js | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/components/person/PersonMovies.js b/src/components/person/PersonMovies.js index 10d904d..4fb39e9 100644 --- a/src/components/person/PersonMovies.js +++ b/src/components/person/PersonMovies.js @@ -1,10 +1,25 @@ -import React from 'react'; +import React, { useEffect, useState } from 'react'; import ContentGrid from '../widget/ContentGrid'; +import Paginate from '../widget/Paginate'; const PersonMovies = ({ credits }) => { + const itemPerPage = 12; + const [items, setItems] = useState(); + const [page, setPage] = useState(1); + + const numOfPages = Math.ceil(credits.cast.length / itemPerPage); + + useEffect(() => { + setItems(credits.cast.slice((page - 1) * itemPerPage, itemPerPage * page)); + }, [page]); + return ( -
- +
+ + + {numOfPages > 1 && credits.cast.length > 0 && ( + + )}
); }; From 6179a124ef83894eb300766c9cb4dd3e17b90db6 Mon Sep 17 00:00:00 2001 From: Mridul2820 Date: Thu, 2 Jun 2022 11:04:43 +0530 Subject: [PATCH 12/24] person movie and tv separate --- .../person/{PersonMovies.js => PersonCredits.js} | 4 ++-- src/components/person/PresonTabs.js | 15 ++++++++++++--- src/pages/withid/PersonDetail.js | 4 +++- 3 files changed, 17 insertions(+), 6 deletions(-) rename src/components/person/{PersonMovies.js => PersonCredits.js} (90%) diff --git a/src/components/person/PersonMovies.js b/src/components/person/PersonCredits.js similarity index 90% rename from src/components/person/PersonMovies.js rename to src/components/person/PersonCredits.js index 4fb39e9..f39c9da 100644 --- a/src/components/person/PersonMovies.js +++ b/src/components/person/PersonCredits.js @@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react'; import ContentGrid from '../widget/ContentGrid'; import Paginate from '../widget/Paginate'; -const PersonMovies = ({ credits }) => { +const PersonCredits = ({ credits }) => { const itemPerPage = 12; const [items, setItems] = useState(); const [page, setPage] = useState(1); @@ -24,4 +24,4 @@ const PersonMovies = ({ credits }) => { ); }; -export default PersonMovies; +export default PersonCredits; diff --git a/src/components/person/PresonTabs.js b/src/components/person/PresonTabs.js index 1a79da0..5509a3f 100644 --- a/src/components/person/PresonTabs.js +++ b/src/components/person/PresonTabs.js @@ -1,6 +1,6 @@ import React, { useState } from 'react'; import PersonGallery from './PersonGallery'; -import PersonMovies from './PersonMovies'; +import PersonCredits from './PersonCredits'; import styled from 'styled-components'; const PresonTabs = ({ creditData }) => { @@ -30,12 +30,21 @@ const PresonTabs = ({ creditData }) => { onClick={handleClick} active={active === 1} id={1} + > + TV Series + + Gallery
- {active === 0 && } - {active === 1 && ( + {active === 0 && } + {active === 1 && } + {active === 2 && ( { const fetchData = async () => { setLoading(true); const { data } = await axios( - `${detailURL}person/${id}?${apiKey}&language=en&append_to_response=external_ids,combined_credits,images,tagged_images` + `${detailURL}person/${id}?${apiKey}&language=en&append_to_response=external_ids,movie_credits,tv_credits,images` ); setCreditData(data); setLoading(false); }; + console.log(creditData); + useEffect(() => { fetchData(); // eslint-disable-next-line From 51ca66d66b2f67f337e728af96422e3621226723 Mon Sep 17 00:00:00 2001 From: Mridul2820 Date: Thu, 2 Jun 2022 11:24:10 +0530 Subject: [PATCH 13/24] media type undefined solve --- src/components/person/PersonCredits.js | 4 ++-- src/components/person/PresonTabs.js | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/components/person/PersonCredits.js b/src/components/person/PersonCredits.js index f39c9da..7ad1ef4 100644 --- a/src/components/person/PersonCredits.js +++ b/src/components/person/PersonCredits.js @@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react'; import ContentGrid from '../widget/ContentGrid'; import Paginate from '../widget/Paginate'; -const PersonCredits = ({ credits }) => { +const PersonCredits = ({ credits, media_type }) => { const itemPerPage = 12; const [items, setItems] = useState(); const [page, setPage] = useState(1); @@ -15,7 +15,7 @@ const PersonCredits = ({ credits }) => { return (
- + {numOfPages > 1 && credits.cast.length > 0 && ( diff --git a/src/components/person/PresonTabs.js b/src/components/person/PresonTabs.js index 5509a3f..642ce9c 100644 --- a/src/components/person/PresonTabs.js +++ b/src/components/person/PresonTabs.js @@ -42,8 +42,12 @@ const PresonTabs = ({ creditData }) => { Gallery
- {active === 0 && } - {active === 1 && } + {active === 0 && ( + + )} + {active === 1 && ( + + )} {active === 2 && ( Date: Thu, 2 Jun 2022 11:52:19 +0530 Subject: [PATCH 14/24] popular person page --- src/App.js | 6 +++ src/constants/routes.js | 3 +- src/data/menuData.js | 11 +++-- src/pages/topic/PopularPersons.js | 76 +++++++++++++++++++++++++++++++ src/pages/topic/Trending.js | 2 +- 5 files changed, 93 insertions(+), 5 deletions(-) create mode 100644 src/pages/topic/PopularPersons.js diff --git a/src/App.js b/src/App.js index fba3809..efbe79f 100644 --- a/src/App.js +++ b/src/App.js @@ -38,6 +38,7 @@ const ChatPage = lazy(() => import('./pages/ChatPage')); const DetailsPage = lazy(() => import('./pages/withid/DetailsPage')); const GenreDetail = lazy(() => import('./pages/withid/GenreDetail')); const PersonDetail = lazy(() => import('./pages/withid/PersonDetail')); +const PopularPersons = lazy(() => import('./pages/topic/PopularPersons')); const NotFound = lazy(() => import('./pages/NotFound')); @@ -147,6 +148,11 @@ const App = () => { + + diff --git a/src/constants/routes.js b/src/constants/routes.js index 4323f75..52a500b 100644 --- a/src/constants/routes.js +++ b/src/constants/routes.js @@ -22,7 +22,8 @@ export const Series_Upcoming = '/upcoming-series'; // Credits export const Person_Detail = '/person/:id'; -export const Credit_Search = '/search-credit'; +export const Popular_Persons = '/popular-persons'; +export const Perosn_Search = '/search-credit'; export const Chats = '/chats'; diff --git a/src/data/menuData.js b/src/data/menuData.js index 18d311b..0584c46 100644 --- a/src/data/menuData.js +++ b/src/data/menuData.js @@ -98,11 +98,16 @@ export const optionsAll = [ route: ROUTES.Genres, }, { - title: 'Search', + title: 'Popular Persons', + route: ROUTES.Popular_Persons, + }, + { + title: 'Movie & TV Search', route: ROUTES.Search, }, + { - title: 'Credit Search', - route: ROUTES.Credit_Search, + title: 'Perosn Search', + route: ROUTES.Perosn_Search, }, ]; diff --git a/src/pages/topic/PopularPersons.js b/src/pages/topic/PopularPersons.js new file mode 100644 index 0000000..2ec9215 --- /dev/null +++ b/src/pages/topic/PopularPersons.js @@ -0,0 +1,76 @@ +import React, { useEffect, useState } from 'react'; +import axios from 'axios'; +import { v4 as uuidv4 } from 'uuid'; +import DocumentMeta from 'react-document-meta'; + +import { API_URL, BASE_URL } from '../../constants/constant'; +import { Popular_Persons } from '../../constants/routes'; +import { Container, PageTitle } from '../../styles/Styles'; +import Paginate from '../../components/widget/Paginate'; +import { img300, noUserImg } from '../../helpers/config'; + +const popularUrl = `${API_URL}/person/popular?`; +const apiKey = `api_key=${process.env.REACT_APP_TMDB}`; + +const PopularPersons = () => { + const [persons, setPersons] = useState([]); + const [page, setPage] = useState(1); + + const fetchPopular = async () => { + const { data } = await axios(`${popularUrl}${apiKey}&page=${page}`); + setPersons(data.results); + }; + + useEffect(() => { + fetchPopular(); + // eslint-disable-next-line + }, [page]); + + console.log(persons); + + const meta = { + title: 'Get the list of popular people - CineParadis', + description: 'Get the list of popular people - CineParadis', + canonical: `${BASE_URL}${Popular_Persons}`, + meta: { + property: { + 'og:title': 'Get the list of popular people - CineParadis', + 'og:description': 'Get the list of popular people - CineParadis', + 'og:url': `${BASE_URL}${Popular_Persons}`, + }, + }, + }; + + return ( + + + Trending Persons Today + {persons && persons.length > 0 && ( +
+ {persons.map((person) => ( + + {person?.name} +

{person.name}

+
+ ))} +
+ )} + {persons.length > 0 && } +
+
+ ); +}; + +export default PopularPersons; diff --git a/src/pages/topic/Trending.js b/src/pages/topic/Trending.js index 5561fa9..247c4f3 100644 --- a/src/pages/topic/Trending.js +++ b/src/pages/topic/Trending.js @@ -34,7 +34,7 @@ const TrendingPage = () => { property: { 'og:title': 'Trending Movies and TV Series - CineParadis', 'og:description': 'Trending Movies and TV Series - CineParadis', - 'og:url': `${BASE_URL}/trending`, + 'og:url': `${BASE_URL}${Trending}`, }, }, }; From 807f9bea5e0d87932649d71dfeb516e98fa57832 Mon Sep 17 00:00:00 2001 From: Mridul2820 Date: Thu, 2 Jun 2022 14:08:08 +0530 Subject: [PATCH 15/24] search folder update --- src/App.js | 6 +++--- src/data/menuData.js | 2 +- src/pages/{topic/Search.js => search/MovieTVSearch.js} | 4 ++-- src/pages/topic/{PopularPersons.js => Persons.js} | 0 4 files changed, 6 insertions(+), 6 deletions(-) rename src/pages/{topic/Search.js => search/MovieTVSearch.js} (98%) rename src/pages/topic/{PopularPersons.js => Persons.js} (100%) diff --git a/src/App.js b/src/App.js index efbe79f..8487a75 100644 --- a/src/App.js +++ b/src/App.js @@ -19,7 +19,7 @@ const Login = lazy(() => import('./pages/Login')); const Dashboard = lazy(() => import('./pages/Dashboard')); const Trending = lazy(() => import('./pages/topic/Trending')); const Genres = lazy(() => import('./pages/topic/Genres')); -const Search = lazy(() => import('./pages/topic/Search')); +const MovieTVSearch = lazy(() => import('./pages/search/MovieTVSearch')); // Movies const DiscoverMovies = lazy(() => import('./pages/movies/DiscoverMovies')); @@ -38,7 +38,7 @@ const ChatPage = lazy(() => import('./pages/ChatPage')); const DetailsPage = lazy(() => import('./pages/withid/DetailsPage')); const GenreDetail = lazy(() => import('./pages/withid/GenreDetail')); const PersonDetail = lazy(() => import('./pages/withid/PersonDetail')); -const PopularPersons = lazy(() => import('./pages/topic/PopularPersons')); +const PopularPersons = lazy(() => import('./pages/topic/Persons')); const NotFound = lazy(() => import('./pages/NotFound')); @@ -157,7 +157,7 @@ const App = () => { - + diff --git a/src/data/menuData.js b/src/data/menuData.js index 0584c46..202962f 100644 --- a/src/data/menuData.js +++ b/src/data/menuData.js @@ -107,7 +107,7 @@ export const optionsAll = [ }, { - title: 'Perosn Search', + title: 'Person Search', route: ROUTES.Perosn_Search, }, ]; diff --git a/src/pages/topic/Search.js b/src/pages/search/MovieTVSearch.js similarity index 98% rename from src/pages/topic/Search.js rename to src/pages/search/MovieTVSearch.js index 389d949..18e7af6 100644 --- a/src/pages/topic/Search.js +++ b/src/pages/search/MovieTVSearch.js @@ -15,7 +15,7 @@ import ContentGrid from '../../components/widget/ContentGrid'; const searchURL = `${API_URL}/search/`; const apiKey = `api_key=${process.env.REACT_APP_TMDB}`; -const SearchPage = () => { +const MovieTVSearch = () => { const [type, setType] = useState('movie'); const [page, setPage] = useState(1); const [searchText, setSearchText] = useState(''); @@ -151,4 +151,4 @@ const Tab = styled.div` transition: background-color 0.5s ease-in-out; `; -export default SearchPage; +export default MovieTVSearch; diff --git a/src/pages/topic/PopularPersons.js b/src/pages/topic/Persons.js similarity index 100% rename from src/pages/topic/PopularPersons.js rename to src/pages/topic/Persons.js From 2a35f4cb88e806fa27ae41f339aea977538b6879 Mon Sep 17 00:00:00 2001 From: Mridul2820 Date: Thu, 2 Jun 2022 14:27:29 +0530 Subject: [PATCH 16/24] search person page --- src/App.js | 5 +- src/components/cards/PersonCard.js | 22 +++++ src/components/person/DetailCard.js | 2 +- src/pages/search/PersonSearch.js | 125 ++++++++++++++++++++++++++++ src/pages/topic/Persons.js | 21 +---- src/pages/withid/PersonDetail.js | 2 - 6 files changed, 154 insertions(+), 23 deletions(-) create mode 100644 src/components/cards/PersonCard.js create mode 100644 src/pages/search/PersonSearch.js diff --git a/src/App.js b/src/App.js index 8487a75..ff00145 100644 --- a/src/App.js +++ b/src/App.js @@ -19,7 +19,10 @@ const Login = lazy(() => import('./pages/Login')); const Dashboard = lazy(() => import('./pages/Dashboard')); const Trending = lazy(() => import('./pages/topic/Trending')); const Genres = lazy(() => import('./pages/topic/Genres')); + +// Search const MovieTVSearch = lazy(() => import('./pages/search/MovieTVSearch')); +const PersonSearch = lazy(() => import('./pages/search/PersonSearch')); // Movies const DiscoverMovies = lazy(() => import('./pages/movies/DiscoverMovies')); @@ -154,10 +157,10 @@ const App = () => { /> - + diff --git a/src/components/cards/PersonCard.js b/src/components/cards/PersonCard.js new file mode 100644 index 0000000..dc3116d --- /dev/null +++ b/src/components/cards/PersonCard.js @@ -0,0 +1,22 @@ +import React from 'react'; +import { img300, noUserImg } from '../../helpers/config'; + +const PersonCard = ({ person }) => { + return ( +
+ {person?.name} +

{person.name}

+
+ ); +}; + +export default PersonCard; diff --git a/src/components/person/DetailCard.js b/src/components/person/DetailCard.js index 15c5611..e8a1c9a 100644 --- a/src/components/person/DetailCard.js +++ b/src/components/person/DetailCard.js @@ -53,7 +53,7 @@ const DetailCard = ({ creditData }) => {

)} - {birthday && ( + {birthday && !deathday && (

Age : diff --git a/src/pages/search/PersonSearch.js b/src/pages/search/PersonSearch.js new file mode 100644 index 0000000..34c3959 --- /dev/null +++ b/src/pages/search/PersonSearch.js @@ -0,0 +1,125 @@ +import React, { useState, useEffect } from 'react'; +import axios from 'axios'; +import DocumentMeta from 'react-document-meta'; +import styled from 'styled-components'; +import { v4 as uuidv4 } from 'uuid'; + +import { Container, PageTitle } from '../../styles/Styles'; +import Paginate from '../../components/widget/Paginate'; +import { API_URL, BASE_URL } from '../../constants/constant'; +import { Perosn_Search } from '../../constants/routes'; +import PersonCard from '../../components/cards/PersonCard'; + +const searchURL = `${API_URL}/search/person`; +const apiKey = `api_key=${process.env.REACT_APP_TMDB}`; + +const PersonSearch = () => { + const [page, setPage] = useState(1); + const [searchText, setSearchText] = useState(''); + const [persons, setPersons] = useState([]); + const [numOfPages, setNumOfPages] = useState(); + + const fetchSearch = async () => { + const { data } = await axios.get( + `${searchURL}?${apiKey}&language=en-US&query=${searchText}&page=${page}$` + ); + + setPersons(data.results); + setNumOfPages(data.total_pages); + }; + + const searchSubmit = (e) => { + e.preventDefault(); + fetchSearch(); + }; + + useEffect(() => { + window.scroll(0, 0); + if (searchText) { + fetchSearch(); + } + // eslint-disable-next-line + }, [page]); + + const meta = { + title: 'Search for People - CineParadis', + description: 'Search for People - CineParadis', + canonical: `${BASE_URL}${Perosn_Search}`, + meta: { + property: { + 'og:title': 'Search for People - CineParadis', + 'og:description': 'Search for People - CineParadis', + 'og:url': `${BASE_URL}${Perosn_Search}`, + }, + }, + }; + + return ( + + + Search People + +

+
+
+ setSearchText(e.target.value)} + /> + +
+
+
+ +
+ {persons.map((person) => ( + + ))} +
+ + {searchText && !persons &&

Try searching something else

} + + {numOfPages > 1 && persons.length > 0 && ( + + )} + + + ); +}; + +const Tab = styled.div` + width: 50%; + white-space: nowrap; + padding: 12px 18px; + line-height: 1; + border: ${(props) => + props.active ? '2px solid rgb(96, 165, 250)' : '2px solid transparent'}; + opacity: ${(props) => (props.active ? '1' : '.8')}; + background-color: ${(props) => + props.active ? 'white' : 'rgb(195, 221, 253)'}; + transition: background-color 0.5s ease-in-out; +`; + +export default PersonSearch; diff --git a/src/pages/topic/Persons.js b/src/pages/topic/Persons.js index 2ec9215..d83ff29 100644 --- a/src/pages/topic/Persons.js +++ b/src/pages/topic/Persons.js @@ -7,7 +7,7 @@ import { API_URL, BASE_URL } from '../../constants/constant'; import { Popular_Persons } from '../../constants/routes'; import { Container, PageTitle } from '../../styles/Styles'; import Paginate from '../../components/widget/Paginate'; -import { img300, noUserImg } from '../../helpers/config'; +import PersonCard from '../../components/cards/PersonCard'; const popularUrl = `${API_URL}/person/popular?`; const apiKey = `api_key=${process.env.REACT_APP_TMDB}`; @@ -26,8 +26,6 @@ const PopularPersons = () => { // eslint-disable-next-line }, [page]); - console.log(persons); - const meta = { title: 'Get the list of popular people - CineParadis', description: 'Get the list of popular people - CineParadis', @@ -48,22 +46,7 @@ const PopularPersons = () => { {persons && persons.length > 0 && (
{persons.map((person) => ( - - {person?.name} -

{person.name}

-
+ ))}
)} diff --git a/src/pages/withid/PersonDetail.js b/src/pages/withid/PersonDetail.js index 03496f2..76c98d0 100644 --- a/src/pages/withid/PersonDetail.js +++ b/src/pages/withid/PersonDetail.js @@ -28,8 +28,6 @@ const PersonDetail = () => { setLoading(false); }; - console.log(creditData); - useEffect(() => { fetchData(); // eslint-disable-next-line From 7583a34c9e0836bba9d09a02596f99a02e171eba Mon Sep 17 00:00:00 2001 From: Mridul2820 Date: Fri, 3 Jun 2022 13:39:08 +0530 Subject: [PATCH 17/24] image gallery detail slider --- package-lock.json | 88 ++++++++++++++++++++++++++ package.json | 1 + src/components/nav/Header.js | 2 +- src/components/person/PersonGallery.js | 53 ++++++++++++++-- src/helpers/config.js | 1 + 5 files changed, 139 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 463852c..de8ed0c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,6 +20,7 @@ "react-document-meta": "^3.0.0-beta.2", "react-dom": "^17.0.2", "react-icons": "^4.3.1", + "react-image-lightbox": "^5.1.4", "react-loader-spinner": "^4.0.0", "react-markdown": "^6.0.3", "react-router-dom": "^5.2.0", @@ -8359,6 +8360,11 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, + "node_modules/exenv": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz", + "integrity": "sha512-Z+ktTxTwv9ILfgKCk32OX3n/doe+OcLTRtqK9pcL+JsP3J1/VW8Uvl4ZjLlKqeW4rzK4oesDOGMEMRIZqtP4Iw==" + }, "node_modules/exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", @@ -15364,11 +15370,29 @@ "react": "*" } }, + "node_modules/react-image-lightbox": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/react-image-lightbox/-/react-image-lightbox-5.1.4.tgz", + "integrity": "sha512-kTiAODz091bgT7SlWNHab0LSMZAPJtlNWDGKv7pLlLY1krmf7FuG1zxE0wyPpeA8gPdwfr3cu6sPwZRqWsc3Eg==", + "dependencies": { + "prop-types": "^15.7.2", + "react-modal": "^3.11.1" + }, + "peerDependencies": { + "react": "16.x || 17.x", + "react-dom": "16.x || 17.x" + } + }, "node_modules/react-is": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" }, + "node_modules/react-lifecycles-compat": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", + "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" + }, "node_modules/react-loader-spinner": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/react-loader-spinner/-/react-loader-spinner-4.0.0.tgz", @@ -15409,6 +15433,24 @@ "react": ">=16" } }, + "node_modules/react-modal": { + "version": "3.15.1", + "resolved": "https://registry.npmjs.org/react-modal/-/react-modal-3.15.1.tgz", + "integrity": "sha512-duB9bxOaYg7Zt6TMFldIFxQRtSP+Dg3F1ZX3FXxSUn+3tZZ/9JCgeAQKDg7rhZSAqopq8TFRw3yIbnx77gyFTw==", + "dependencies": { + "exenv": "^1.2.0", + "prop-types": "^15.7.2", + "react-lifecycles-compat": "^3.0.0", + "warning": "^4.0.3" + }, + "engines": { + "node": ">=8" + }, + "peerDependencies": { + "react": "^0.14.0 || ^15.0.0 || ^16 || ^17 || ^18", + "react-dom": "^0.14.0 || ^15.0.0 || ^16 || ^17 || ^18" + } + }, "node_modules/react-quill": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/react-quill/-/react-quill-1.3.5.tgz", @@ -17793,6 +17835,14 @@ "makeerror": "1.0.12" } }, + "node_modules/warning": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", + "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", + "dependencies": { + "loose-envify": "^1.0.0" + } + }, "node_modules/watchpack": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.3.1.tgz", @@ -24684,6 +24734,11 @@ "strip-final-newline": "^2.0.0" } }, + "exenv": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz", + "integrity": "sha512-Z+ktTxTwv9ILfgKCk32OX3n/doe+OcLTRtqK9pcL+JsP3J1/VW8Uvl4ZjLlKqeW4rzK4oesDOGMEMRIZqtP4Iw==" + }, "exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", @@ -29638,11 +29693,25 @@ "integrity": "sha512-cB10MXLTs3gVuXimblAdI71jrJx8njrJZmNMEMC+sQu5B/BIOmlsAjskdqpn81y8UBVEGuHODd7/ci5DvoSzTQ==", "requires": {} }, + "react-image-lightbox": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/react-image-lightbox/-/react-image-lightbox-5.1.4.tgz", + "integrity": "sha512-kTiAODz091bgT7SlWNHab0LSMZAPJtlNWDGKv7pLlLY1krmf7FuG1zxE0wyPpeA8gPdwfr3cu6sPwZRqWsc3Eg==", + "requires": { + "prop-types": "^15.7.2", + "react-modal": "^3.11.1" + } + }, "react-is": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" }, + "react-lifecycles-compat": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", + "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" + }, "react-loader-spinner": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/react-loader-spinner/-/react-loader-spinner-4.0.0.tgz", @@ -29671,6 +29740,17 @@ "vfile": "^4.0.0" } }, + "react-modal": { + "version": "3.15.1", + "resolved": "https://registry.npmjs.org/react-modal/-/react-modal-3.15.1.tgz", + "integrity": "sha512-duB9bxOaYg7Zt6TMFldIFxQRtSP+Dg3F1ZX3FXxSUn+3tZZ/9JCgeAQKDg7rhZSAqopq8TFRw3yIbnx77gyFTw==", + "requires": { + "exenv": "^1.2.0", + "prop-types": "^15.7.2", + "react-lifecycles-compat": "^3.0.0", + "warning": "^4.0.3" + } + }, "react-quill": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/react-quill/-/react-quill-1.3.5.tgz", @@ -31451,6 +31531,14 @@ "makeerror": "1.0.12" } }, + "warning": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", + "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", + "requires": { + "loose-envify": "^1.0.0" + } + }, "watchpack": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.3.1.tgz", diff --git a/package.json b/package.json index a9c3c64..e06de35 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "react-document-meta": "^3.0.0-beta.2", "react-dom": "^17.0.2", "react-icons": "^4.3.1", + "react-image-lightbox": "^5.1.4", "react-loader-spinner": "^4.0.0", "react-markdown": "^6.0.3", "react-router-dom": "^5.2.0", diff --git a/src/components/nav/Header.js b/src/components/nav/Header.js index a505b42..432520c 100644 --- a/src/components/nav/Header.js +++ b/src/components/nav/Header.js @@ -84,7 +84,7 @@ const Container = styled.div` position: sticky; top: 0; left: 0; - z-index: 10000; + z-index: 100; `; const HeaderRight = styled.div` diff --git a/src/components/person/PersonGallery.js b/src/components/person/PersonGallery.js index ab9d1c2..5d26d8a 100644 --- a/src/components/person/PersonGallery.js +++ b/src/components/person/PersonGallery.js @@ -1,20 +1,41 @@ -import React from 'react'; -import { img500 } from '../../helpers/config'; +import React, { useState } from 'react'; +import { img500, imgOriginal } from '../../helpers/config'; import { v4 as uuidv4 } from 'uuid'; +import Lightbox from 'react-image-lightbox'; +import 'react-image-lightbox/style.css'; const PersonGallery = ({ images, defaultImage, alt }) => { + const [isOpen, setIsOpen] = useState(false); + const [photoIndex, setPhotoIndex] = useState(0); + + if (isOpen) { + document.body.style.overflow = 'hidden'; + } else { + document.body.style.overflow = 'auto'; + } + + const imageArray = + images.profiles.length > 0 + ? images.profiles?.map(function (image) { + return `${imgOriginal}${image.file_path}`; + }) + : [`${imgOriginal}/${defaultImage}`]; return (
{images.profiles ? (
{images.profiles.length > 0 ? ( - images.profiles.map((photo) => ( + images.profiles.map((photo, index) => ( {alt} { + setIsOpen(true); + setPhotoIndex(index); + }} /> )) ) : ( @@ -24,7 +45,11 @@ const PersonGallery = ({ images, defaultImage, alt }) => { src={`${img500}/${defaultImage}`} alt={alt} loading="lazy" - className={'gallery-image-profile'} + className={'gallery-image-profile cursor-pointer'} + onClick={() => { + setIsOpen(true); + setPhotoIndex(0); + }} /> ) : (

@@ -37,6 +62,24 @@ const PersonGallery = ({ images, defaultImage, alt }) => { ) : (

No Photo Found

)} + + {isOpen && ( + setIsOpen(false)} + onMovePrevRequest={() => + setPhotoIndex(photoIndex + imageArray.length - 1) % + imageArray.length + } + onMoveNextRequest={() => + setPhotoIndex((photoIndex + 1) % imageArray.length) + } + /> + )}
); }; diff --git a/src/helpers/config.js b/src/helpers/config.js index 92a2b4d..9dac225 100644 --- a/src/helpers/config.js +++ b/src/helpers/config.js @@ -2,6 +2,7 @@ export const img200 = 'https://image.tmdb.org/t/p/w200'; export const img300 = 'https://image.tmdb.org/t/p/w300'; export const img500 = 'https://image.tmdb.org/t/p/w500'; +export const imgOriginal = 'https://image.tmdb.org/t/p/original'; // contentModal and MovieSeries export const unavailable = From cb5d4e0fc2af79ae63f50059af4db184be4596f7 Mon Sep 17 00:00:00 2001 From: Mridul2820 Date: Fri, 3 Jun 2022 13:57:07 +0530 Subject: [PATCH 18/24] Gallery add for movie images --- src/components/details/Gallery.js | 125 +++++++++++++++++++------ src/components/person/PersonGallery.js | 29 ++---- src/components/widget/LightBoxPop.js | 24 +++++ 3 files changed, 129 insertions(+), 49 deletions(-) create mode 100644 src/components/widget/LightBoxPop.js diff --git a/src/components/details/Gallery.js b/src/components/details/Gallery.js index e1509c5..b473686 100644 --- a/src/components/details/Gallery.js +++ b/src/components/details/Gallery.js @@ -1,7 +1,8 @@ import React, { useState } from 'react'; import styled from 'styled-components'; import { v4 as uuidv4 } from 'uuid'; -import { img500 } from '../../helpers/config'; +import { img500, imgOriginal } from '../../helpers/config'; +import LightBoxPop from '../widget/LightBoxPop'; const Gallery = ({ title, photos, backdrop_path, poster_path }) => { // Tabs @@ -14,9 +15,45 @@ const Gallery = ({ title, photos, backdrop_path, poster_path }) => { } }; + const [isOpen, setIsOpen] = useState(false); + const [photoIndex, setPhotoIndex] = useState(0); + + if (isOpen) { + document.body.style.overflow = 'hidden'; + } else { + document.body.style.overflow = 'auto'; + } + + let imageArray = []; + if (active === 0) { + imageArray = + photos.backdrops.length > 0 + ? photos.backdrops?.map(function (image) { + return `${imgOriginal}${image.file_path}`; + }) + : [`${imgOriginal}${backdrop_path}`]; + } + + if (active === 2) { + imageArray = + photos.posters.length > 0 + ? photos.posters?.map(function (image) { + return `${imgOriginal}${image.file_path}`; + }) + : [`${imgOriginal}${poster_path}`]; + } + + if (active === 1) { + imageArray = + photos?.logos?.length > 0 && + photos?.logos?.map(function (image) { + return `${imgOriginal}${image.file_path}`; + }); + } + return (
-

Gallery of {title}

+

Gallery of {title}

{photos.posters.length > 0 || photos.logos.length > 0 || photos.posters.length > 0 || @@ -56,59 +93,78 @@ const Gallery = ({ title, photos, backdrop_path, poster_path }) => { )}
- {active === 0 && - (photos?.backdrops?.length > 0 || backdrop_path) && ( - <> - {photos.backdrops.length > 0 ? ( - photos.backdrops.map((photo) => ( - {photo.title} - )) - ) : ( + {active === 0 && (photos?.backdrops?.length > 0 || backdrop_path) && ( + <> + {photos.backdrops.length > 0 ? ( + photos.backdrops.map((photo, index) => ( {title} { + setIsOpen(true); + setPhotoIndex(index); + }} /> - )} - - )} + )) + ) : ( + {title} { + setIsOpen(true); + setPhotoIndex(0); + }} + /> + )} + + )} {active === 1 && photos?.logos?.length > 0 && - photos.logos.map((photo) => ( + photos.logos.map((photo, index) => ( {photo.title} { + setIsOpen(true); + setPhotoIndex(index); + }} /> ))} {active === 2 && (photos?.posters?.length > 0 || poster_path) && ( <> {photos.posters.length > 0 ? ( - photos.posters.map((photo) => ( + photos.posters.map((photo, index) => ( {photo.title} { + setIsOpen(true); + setPhotoIndex(index); + }} /> )) ) : ( {title} { + setIsOpen(true); + setPhotoIndex(0); + }} /> )} @@ -118,6 +174,15 @@ const Gallery = ({ title, photos, backdrop_path, poster_path }) => { ) : (

No Photo Found

)} + + {isOpen && ( + + )}
); }; diff --git a/src/components/person/PersonGallery.js b/src/components/person/PersonGallery.js index 5d26d8a..287d0aa 100644 --- a/src/components/person/PersonGallery.js +++ b/src/components/person/PersonGallery.js @@ -1,8 +1,7 @@ import React, { useState } from 'react'; import { img500, imgOriginal } from '../../helpers/config'; import { v4 as uuidv4 } from 'uuid'; -import Lightbox from 'react-image-lightbox'; -import 'react-image-lightbox/style.css'; +import LightBoxPop from '../widget/LightBoxPop'; const PersonGallery = ({ images, defaultImage, alt }) => { const [isOpen, setIsOpen] = useState(false); @@ -19,7 +18,8 @@ const PersonGallery = ({ images, defaultImage, alt }) => { ? images.profiles?.map(function (image) { return `${imgOriginal}${image.file_path}`; }) - : [`${imgOriginal}/${defaultImage}`]; + : [`${imgOriginal}${defaultImage}`]; + return (
{images.profiles ? ( @@ -28,7 +28,7 @@ const PersonGallery = ({ images, defaultImage, alt }) => { images.profiles.map((photo, index) => ( {alt} { <> {defaultImage ? ( {alt} { )} {isOpen && ( - setIsOpen(false)} - onMovePrevRequest={() => - setPhotoIndex(photoIndex + imageArray.length - 1) % - imageArray.length - } - onMoveNextRequest={() => - setPhotoIndex((photoIndex + 1) % imageArray.length) - } + )}
diff --git a/src/components/widget/LightBoxPop.js b/src/components/widget/LightBoxPop.js new file mode 100644 index 0000000..8d41b28 --- /dev/null +++ b/src/components/widget/LightBoxPop.js @@ -0,0 +1,24 @@ +import React from 'react'; +import Lightbox from 'react-image-lightbox'; +import 'react-image-lightbox/style.css'; + +const LightBoxPop = ({ imageArray, photoIndex, setPhotoIndex, setIsOpen }) => { + return ( + setIsOpen(false)} + onMovePrevRequest={() => + setPhotoIndex(photoIndex + imageArray.length - 1) % imageArray.length + } + onMoveNextRequest={() => + setPhotoIndex((photoIndex + 1) % imageArray.length) + } + /> + ); +}; + +export default LightBoxPop; From 976558f07cbf0ddfbf04a3469fa815a0139b2df4 Mon Sep 17 00:00:00 2001 From: Mridul2820 Date: Fri, 3 Jun 2022 13:57:59 +0530 Subject: [PATCH 19/24] image path fix --- src/components/cards/PersonCard.js | 2 +- src/components/details/CastnCrew.js | 2 +- src/components/details/CollectionData.js | 2 +- src/components/details/FactBox.js | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/cards/PersonCard.js b/src/components/cards/PersonCard.js index dc3116d..32b47f0 100644 --- a/src/components/cards/PersonCard.js +++ b/src/components/cards/PersonCard.js @@ -9,7 +9,7 @@ const PersonCard = ({ person }) => { > {person?.name} { {credit?.name} {
{collectionData.name}
diff --git a/src/components/details/FactBox.js b/src/components/details/FactBox.js index de949f1..09fe577 100644 --- a/src/components/details/FactBox.js +++ b/src/components/details/FactBox.js @@ -54,7 +54,7 @@ const FactBox = ({ content, type }) => { className="w-9 h-9 object-cover rounded-full" src={ producer.profile_path - ? `${img200}/${producer.profile_path}` + ? `${img200}${producer.profile_path}` : noPicture } alt={producer.name} @@ -82,7 +82,7 @@ const FactBox = ({ content, type }) => { key={uuidv4()} src={ producer.profile_path - ? `${img200}/${producer.profile_path}` + ? `${img200}${producer.profile_path}` : noPicture } alt={producer.name} @@ -169,7 +169,7 @@ const FactBox = ({ content, type }) => { key={uuidv4()} src={ network.logo_path - ? `${img200}/${network.logo_path}` + ? `${img200}${network.logo_path}` : noPicture } alt={network.name} From 33391aec160d28d218569a521434daf5d3e21025 Mon Sep 17 00:00:00 2001 From: Mridul2820 Date: Fri, 3 Jun 2022 14:06:54 +0530 Subject: [PATCH 20/24] Person Detail Seo add --- src/pages/withid/PersonDetail.js | 40 +++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/src/pages/withid/PersonDetail.js b/src/pages/withid/PersonDetail.js index 76c98d0..c54d943 100644 --- a/src/pages/withid/PersonDetail.js +++ b/src/pages/withid/PersonDetail.js @@ -1,6 +1,7 @@ import axios from 'axios'; import React, { useEffect, useState } from 'react'; import Loader from 'react-loader-spinner'; +import DocumentMeta from 'react-document-meta'; import { useParams } from 'react-router-dom'; import DetailCard from '../../components/person/DetailCard'; import PersonIntro from '../../components/person/PersonIntro'; @@ -8,6 +9,7 @@ import PresonTabs from '../../components/person/PresonTabs'; import { API_URL, BASE_URL } from '../../constants/constant'; import { Container } from '../../styles/Styles'; +import { img500 } from '../../helpers/config'; const detailURL = `${API_URL}/`; const apiKey = `api_key=${process.env.REACT_APP_TMDB}`; @@ -33,6 +35,26 @@ const PersonDetail = () => { // eslint-disable-next-line }, []); + const getTitle = creditData?.name ? creditData.name + ' - ' : ' '; + const getSlug = `person/${id}`; + const getOgImg = creditData?.profile_path + ? `${img500}${creditData.profile_path}` + : ''; + + const meta = { + title: `${getTitle} CineParadis`, + description: `Discover all destails, biography, Social Links, Movies and Secries and Images of ${creditData?.name} - CineParadis`, + canonical: `${BASE_URL}${getSlug}`, + meta: { + property: { + 'og:image': getOgImg, + 'og:title': `${getTitle} CineParadis`, + 'og:description': `Discover all destails, biography, Social Links, Movies and Secries and Images of ${creditData?.name} - CineParadis`, + 'og:url': `${BASE_URL}/${getSlug}`, + }, + }, + }; + if (loading) { return ( @@ -48,14 +70,16 @@ const PersonDetail = () => { } return ( - - {creditData && } - -
- {creditData && } - {creditData && } -
-
+ + + {creditData && } + +
+ {creditData && } + {creditData && } +
+
+
); }; From ef11685dfc42a6e92a6564379c0b85de445bd54c Mon Sep 17 00:00:00 2001 From: Mridul2820 Date: Fri, 3 Jun 2022 14:07:41 +0530 Subject: [PATCH 21/24] consoles remove --- src/components/details/FactBox.js | 2 -- src/components/widget/GenresChip.js | 1 - src/pages/Login.js | 1 - 3 files changed, 4 deletions(-) diff --git a/src/components/details/FactBox.js b/src/components/details/FactBox.js index 09fe577..b3d7770 100644 --- a/src/components/details/FactBox.js +++ b/src/components/details/FactBox.js @@ -68,8 +68,6 @@ const FactBox = ({ content, type }) => {
)} - {console.log(getDirector(crew))} - {crew && getProducer(crew).length > 0 && (
diff --git a/src/components/widget/GenresChip.js b/src/components/widget/GenresChip.js index 0eb9d08..3938854 100644 --- a/src/components/widget/GenresChip.js +++ b/src/components/widget/GenresChip.js @@ -34,7 +34,6 @@ const GenresChip = ({ ); setGenres(data.genres); - // console.log(data) }; useEffect(() => { diff --git a/src/pages/Login.js b/src/pages/Login.js index 2cec7ab..c754a7a 100644 --- a/src/pages/Login.js +++ b/src/pages/Login.js @@ -17,7 +17,6 @@ const Login = () => { const handleLogin = async () => { try { const createdUser = await firebase.auth().signInWithPopup(provider); - // console.log('createdUser', createdUser.user); const gmailExists = await doesGmailExist(createdUser.user.email); From 90e874ff671894a95fb59125a851a1b2fd62346a Mon Sep 17 00:00:00 2001 From: Mridul2820 Date: Fri, 3 Jun 2022 15:18:28 +0530 Subject: [PATCH 22/24] reusable search bar --- src/components/search/SearchBarIcon.js | 39 ++++++++++++++++++++++++++ src/pages/search/MovieTVSearch.js | 37 ++++-------------------- src/pages/search/PersonSearch.js | 37 ++++-------------------- 3 files changed, 51 insertions(+), 62 deletions(-) create mode 100644 src/components/search/SearchBarIcon.js diff --git a/src/components/search/SearchBarIcon.js b/src/components/search/SearchBarIcon.js new file mode 100644 index 0000000..4cddaef --- /dev/null +++ b/src/components/search/SearchBarIcon.js @@ -0,0 +1,39 @@ +import React from 'react'; + +const SearchBarIcon = ({ onSubmit, onChange }) => { + return ( +
+
+ + +
+
+ ); +}; + +export default SearchBarIcon; diff --git a/src/pages/search/MovieTVSearch.js b/src/pages/search/MovieTVSearch.js index 18e7af6..0000308 100644 --- a/src/pages/search/MovieTVSearch.js +++ b/src/pages/search/MovieTVSearch.js @@ -11,6 +11,7 @@ import { API_URL, BASE_URL } from '../../constants/constant'; import { Search } from '../../constants/routes'; import ContentGrid from '../../components/widget/ContentGrid'; +import SearchBarIcon from '../../components/search/SearchBarIcon'; const searchURL = `${API_URL}/search/`; const apiKey = `api_key=${process.env.REACT_APP_TMDB}`; @@ -48,6 +49,10 @@ const MovieTVSearch = () => { fetchSearch(); }; + const onChange = (e) => { + setSearchText(e.target.value); + }; + useEffect(() => { window.scroll(0, 0); if (searchText) { @@ -74,37 +79,7 @@ const MovieTVSearch = () => {
-
-
- setSearchText(e.target.value)} - /> - -
-
+
{ fetchSearch(); }; + const onChange = (e) => { + setSearchText(e.target.value); + }; + useEffect(() => { window.scroll(0, 0); if (searchText) { @@ -60,37 +65,7 @@ const PersonSearch = () => { Search People
-
-
- setSearchText(e.target.value)} - /> - -
-
+
From 3b4804bbb6137842a63cce2b5f67e4187d00e269 Mon Sep 17 00:00:00 2001 From: Mridul2820 Date: Fri, 3 Jun 2022 15:23:58 +0530 Subject: [PATCH 23/24] credits data improve --- src/components/person/PersonCredits.js | 8 ++++++-- src/components/person/PersonIntro.js | 21 ++++++++++++--------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/src/components/person/PersonCredits.js b/src/components/person/PersonCredits.js index 7ad1ef4..2fdb0d0 100644 --- a/src/components/person/PersonCredits.js +++ b/src/components/person/PersonCredits.js @@ -15,9 +15,13 @@ const PersonCredits = ({ credits, media_type }) => { return (
- + {items && items.length > 0 ? ( + + ) : ( +

No {media_type} Found

+ )} - {numOfPages > 1 && credits.cast.length > 0 && ( + {numOfPages > 1 && items && items.length > 0 && ( )}
diff --git a/src/components/person/PersonIntro.js b/src/components/person/PersonIntro.js index 5531411..fb62040 100644 --- a/src/components/person/PersonIntro.js +++ b/src/components/person/PersonIntro.js @@ -19,15 +19,18 @@ const PersonIntro = ({ creditData }) => {

{creditData?.name}

-

Biography

- -
- -
+ {creditData?.biography && ( + <> +

Biography

+
+ +
+ + )}
); From 84396cf7c00f9c394b825cfdbd8ae49833ed234c Mon Sep 17 00:00:00 2001 From: Mridul2820 Date: Fri, 3 Jun 2022 15:53:24 +0530 Subject: [PATCH 24/24] search in person mocie and series --- src/components/details/CastnCrew.js | 28 ++++++++++++++++--- src/components/person/PersonCredits.js | 28 ++++++++++++++++--- src/components/search/SearchBar.js | 37 ++++++++++++++++++++++++++ src/components/search/SearchBarIcon.js | 6 ++--- src/pages/search/MovieTVSearch.js | 7 ++++- src/pages/search/PersonSearch.js | 7 ++++- 6 files changed, 102 insertions(+), 11 deletions(-) create mode 100644 src/components/search/SearchBar.js diff --git a/src/components/details/CastnCrew.js b/src/components/details/CastnCrew.js index 7a2eb96..644b090 100644 --- a/src/components/details/CastnCrew.js +++ b/src/components/details/CastnCrew.js @@ -1,15 +1,37 @@ -import React from 'react'; +import React, { useState } from 'react'; import styled from 'styled-components'; import { v4 as uuidv4 } from 'uuid'; import { img200, noUserImg } from '../../helpers/config'; +import SearchBar from '../search/SearchBar'; const CastnCrew = ({ credits, title }) => { + const [search, setSearch] = useState(''); + + const handleChange = (e) => { + setSearch(e.target.value); + }; + + const filtered = credits.filter((person) => { + return ( + person?.name?.toLowerCase().includes(search.toLowerCase()) || + person?.character?.toLowerCase().includes(search.toLowerCase()) + ); + }); + return (

Cast of {title}

- {credits && credits.length > 0 ? ( + + + + {credits && credits.length > 0 && filtered && filtered.length > 0 ? (
- {credits.map((credit) => ( + {filtered.map((credit) => (
diff --git a/src/components/person/PersonCredits.js b/src/components/person/PersonCredits.js index 2fdb0d0..59740d1 100644 --- a/src/components/person/PersonCredits.js +++ b/src/components/person/PersonCredits.js @@ -1,4 +1,5 @@ import React, { useEffect, useState } from 'react'; +import SearchBar from '../search/SearchBar'; import ContentGrid from '../widget/ContentGrid'; import Paginate from '../widget/Paginate'; @@ -6,15 +7,36 @@ const PersonCredits = ({ credits, media_type }) => { const itemPerPage = 12; const [items, setItems] = useState(); const [page, setPage] = useState(1); + const [search, setSearch] = useState(''); - const numOfPages = Math.ceil(credits.cast.length / itemPerPage); + const filtered = credits.cast.filter((credit) => { + return ( + credit?.title?.toLowerCase().includes(search.toLowerCase()) || + credit?.name?.toLowerCase().includes(search.toLowerCase()) + ); + }); + + const numOfPages = Math.ceil(filtered.length / itemPerPage); useEffect(() => { - setItems(credits.cast.slice((page - 1) * itemPerPage, itemPerPage * page)); - }, [page]); + setItems(filtered.slice((page - 1) * itemPerPage, itemPerPage * page)); + }, [page, search]); + + const handleChange = (e) => { + setSearch(e.target.value); + }; return (
+
+ +
+ {items && items.length > 0 ? ( ) : ( diff --git a/src/components/search/SearchBar.js b/src/components/search/SearchBar.js new file mode 100644 index 0000000..de1788f --- /dev/null +++ b/src/components/search/SearchBar.js @@ -0,0 +1,37 @@ +import React from 'react'; + +const SearchBar = ({ search, handleChange, placeHolder, searchId }) => { + return ( +
+
+ + +
+ + + +
+
+
+ ); +}; + +export default SearchBar; diff --git a/src/components/search/SearchBarIcon.js b/src/components/search/SearchBarIcon.js index 4cddaef..0800c28 100644 --- a/src/components/search/SearchBarIcon.js +++ b/src/components/search/SearchBarIcon.js @@ -1,14 +1,14 @@ import React from 'react'; -const SearchBarIcon = ({ onSubmit, onChange }) => { +const SearchBarIcon = ({ onSubmit, onChange, placeHolder, searchId }) => { return (
diff --git a/src/pages/search/MovieTVSearch.js b/src/pages/search/MovieTVSearch.js index 0000308..0aa845e 100644 --- a/src/pages/search/MovieTVSearch.js +++ b/src/pages/search/MovieTVSearch.js @@ -79,7 +79,12 @@ const MovieTVSearch = () => {
- +
{ Search People
- +