From 11ef435001744cf4dff835da3eba1f3edcea341c Mon Sep 17 00:00:00 2001 From: Cooper Ransom Date: Fri, 5 Apr 2024 10:48:47 -0400 Subject: [PATCH] Optimize catogorys --- package.json | 2 +- pnpm-lock.yaml | 84 +++++++++++++++++++++--------------------- src/pages/Discover.tsx | 12 ++++-- 3 files changed, 51 insertions(+), 47 deletions(-) diff --git a/package.json b/package.json index 1fb4914e..24ea0e92 100644 --- a/package.json +++ b/package.json @@ -120,7 +120,7 @@ "tailwindcss": "^3.4.3", "tailwindcss-themer": "^4.0.0", "type-fest": "^4.15.0", - "typescript": "^5.4.3", + "typescript": "^5.4.4", "vite": "^5.2.8", "vite-plugin-checker": "^0.6.4", "vite-plugin-package-version": "^1.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b8b505f7..57d5cae7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -211,10 +211,10 @@ devDependencies: version: 7.5.8 '@typescript-eslint/eslint-plugin': specifier: ^6.21.0 - version: 6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.57.0)(typescript@5.4.3) + version: 6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.57.0)(typescript@5.4.4) '@typescript-eslint/parser': specifier: ^6.21.0 - version: 6.21.0(eslint@8.57.0)(typescript@5.4.3) + version: 6.21.0(eslint@8.57.0)(typescript@5.4.4) '@vitejs/plugin-react': specifier: ^4.2.1 version: 4.2.1(vite@5.2.8) @@ -291,14 +291,14 @@ devDependencies: specifier: ^4.15.0 version: 4.15.0 typescript: - specifier: ^5.4.3 - version: 5.4.3 + specifier: ^5.4.4 + version: 5.4.4 vite: specifier: ^5.2.8 version: 5.2.8(@types/node@20.12.4) vite-plugin-checker: specifier: ^0.6.4 - version: 0.6.4(eslint@8.57.0)(typescript@5.4.3)(vite@5.2.8) + version: 0.6.4(eslint@8.57.0)(typescript@5.4.4)(vite@5.2.8) vite-plugin-package-version: specifier: ^1.1.0 version: 1.1.0(vite@5.2.8) @@ -2166,8 +2166,8 @@ packages: '@babel/types': 7.24.0 dev: true - /@types/chrome@0.0.263: - resolution: {integrity: sha512-As0vzv99ov3M6ZR7R6VzhMWFZXkPMrFrCEXXVrMN576Cm70fTkj7Df2CF+qEo170JepX50pd11cX6O4DSAtl2Q==} + /@types/chrome@0.0.265: + resolution: {integrity: sha512-wusn3sa1C0UOGs7B07EHgCin/G8TQQXWFJhI8F5uwJ0dNGYBj5/+JPmP/l+x+E2ntXXyX/eeN2Bj6Sk6dzMEtA==} dependencies: '@types/filesystem': 0.0.36 '@types/har-format': 1.2.15 @@ -2176,7 +2176,7 @@ packages: /@types/chromecast-caf-sender@1.0.9: resolution: {integrity: sha512-+u4Y5O4OkkNjG+V2l2Cnsw6pSYS+lg4Jlnxh+FVVqdnXp+M8R4Umor1C3JA6u/iXCpTmIndOaBvZa3bMhGZgnw==} dependencies: - '@types/chrome': 0.0.263 + '@types/chrome': 0.0.265 dev: true /@types/crypto-js@4.2.2: @@ -2336,7 +2336,7 @@ packages: resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==} dev: true - /@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.57.0)(typescript@5.4.3): + /@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.57.0)(typescript@5.4.4): resolution: {integrity: sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -2348,10 +2348,10 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.4.3) + '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.4.4) '@typescript-eslint/scope-manager': 6.21.0 - '@typescript-eslint/type-utils': 6.21.0(eslint@8.57.0)(typescript@5.4.3) - '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.4.3) + '@typescript-eslint/type-utils': 6.21.0(eslint@8.57.0)(typescript@5.4.4) + '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.4.4) '@typescript-eslint/visitor-keys': 6.21.0 debug: 4.3.4 eslint: 8.57.0 @@ -2359,13 +2359,13 @@ packages: ignore: 5.3.1 natural-compare: 1.4.0 semver: 7.6.0 - ts-api-utils: 1.3.0(typescript@5.4.3) - typescript: 5.4.3 + ts-api-utils: 1.3.0(typescript@5.4.4) + typescript: 5.4.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.3): + /@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.4): resolution: {integrity: sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -2377,11 +2377,11 @@ packages: dependencies: '@typescript-eslint/scope-manager': 6.21.0 '@typescript-eslint/types': 6.21.0 - '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.4.3) + '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.4.4) '@typescript-eslint/visitor-keys': 6.21.0 debug: 4.3.4 eslint: 8.57.0 - typescript: 5.4.3 + typescript: 5.4.4 transitivePeerDependencies: - supports-color dev: true @@ -2394,7 +2394,7 @@ packages: '@typescript-eslint/visitor-keys': 6.21.0 dev: true - /@typescript-eslint/type-utils@6.21.0(eslint@8.57.0)(typescript@5.4.3): + /@typescript-eslint/type-utils@6.21.0(eslint@8.57.0)(typescript@5.4.4): resolution: {integrity: sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -2404,12 +2404,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.4.3) - '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.4.3) + '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.4.4) + '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.4.4) debug: 4.3.4 eslint: 8.57.0 - ts-api-utils: 1.3.0(typescript@5.4.3) - typescript: 5.4.3 + ts-api-utils: 1.3.0(typescript@5.4.4) + typescript: 5.4.4 transitivePeerDependencies: - supports-color dev: true @@ -2419,7 +2419,7 @@ packages: engines: {node: ^16.0.0 || >=18.0.0} dev: true - /@typescript-eslint/typescript-estree@6.21.0(typescript@5.4.3): + /@typescript-eslint/typescript-estree@6.21.0(typescript@5.4.4): resolution: {integrity: sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -2435,13 +2435,13 @@ packages: is-glob: 4.0.3 minimatch: 9.0.3 semver: 7.6.0 - ts-api-utils: 1.3.0(typescript@5.4.3) - typescript: 5.4.3 + ts-api-utils: 1.3.0(typescript@5.4.4) + typescript: 5.4.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils@6.21.0(eslint@8.57.0)(typescript@5.4.3): + /@typescript-eslint/utils@6.21.0(eslint@8.57.0)(typescript@5.4.4): resolution: {integrity: sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -2452,7 +2452,7 @@ packages: '@types/semver': 7.5.8 '@typescript-eslint/scope-manager': 6.21.0 '@typescript-eslint/types': 6.21.0 - '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.4.3) + '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.4.4) eslint: 8.57.0 semver: 7.6.0 transitivePeerDependencies: @@ -2750,7 +2750,7 @@ packages: postcss: '>=8.4.31' dependencies: browserslist: 4.23.0 - caniuse-lite: 1.0.30001605 + caniuse-lite: 1.0.30001606 fraction.js: 4.3.7 normalize-range: 0.1.2 picocolors: 1.0.0 @@ -2854,8 +2854,8 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001605 - electron-to-chromium: 1.4.726 + caniuse-lite: 1.0.30001606 + electron-to-chromium: 1.4.728 node-releases: 2.0.14 update-browserslist-db: 1.0.13(browserslist@4.23.0) @@ -2894,8 +2894,8 @@ packages: engines: {node: '>= 6'} dev: true - /caniuse-lite@1.0.30001605: - resolution: {integrity: sha512-nXwGlFWo34uliI9z3n6Qc0wZaf7zaZWA1CPZ169La5mV3I/gem7bst0vr5XQH5TJXZIMfDeZyOrZnSlVzKxxHQ==} + /caniuse-lite@1.0.30001606: + resolution: {integrity: sha512-LPbwnW4vfpJId225pwjZJOgX1m9sGfbw/RKJvw/t0QhYOOaTXHvkjVGFGPpvwEzufrjvTlsULnVTxdy4/6cqkg==} /chai@4.4.1: resolution: {integrity: sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==} @@ -3361,8 +3361,8 @@ packages: jake: 10.8.7 dev: true - /electron-to-chromium@1.4.726: - resolution: {integrity: sha512-xtjfBXn53RORwkbyKvDfTajtnTp0OJoPOIBzXvkNbb7+YYvCHJflba3L7Txyx/6Fov3ov2bGPr/n5MTixmPhdQ==} + /electron-to-chromium@1.4.728: + resolution: {integrity: sha512-Ud1v7hJJYIqehlUJGqR6PF1Ek8l80zWwxA6nGxigBsGJ9f9M2fciHyrIiNMerSHSH3p+0/Ia7jIlnDkt41h5cw==} /emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -3647,7 +3647,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.4.3) + '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.4.4) debug: 3.2.7 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 @@ -3666,7 +3666,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.4.3) + '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.4.4) array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 array.prototype.flat: 1.3.2 @@ -6514,13 +6514,13 @@ packages: punycode: 2.3.1 dev: true - /ts-api-utils@1.3.0(typescript@5.4.3): + /ts-api-utils@1.3.0(typescript@5.4.4): resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} engines: {node: '>=16'} peerDependencies: typescript: '>=4.2.0' dependencies: - typescript: 5.4.3 + typescript: 5.4.4 dev: true /ts-easing@0.2.0: @@ -6625,8 +6625,8 @@ packages: hasBin: true dev: false - /typescript@5.4.3: - resolution: {integrity: sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==} + /typescript@5.4.4: + resolution: {integrity: sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw==} engines: {node: '>=14.17'} hasBin: true dev: true @@ -6769,7 +6769,7 @@ packages: - terser dev: true - /vite-plugin-checker@0.6.4(eslint@8.57.0)(typescript@5.4.3)(vite@5.2.8): + /vite-plugin-checker@0.6.4(eslint@8.57.0)(typescript@5.4.4)(vite@5.2.8): resolution: {integrity: sha512-2zKHH5oxr+ye43nReRbC2fny1nyARwhxdm0uNYp/ERy4YvU9iZpNOsueoi/luXw5gnpqRSvjcEPxXbS153O2wA==} engines: {node: '>=14.16'} peerDependencies: @@ -6812,7 +6812,7 @@ packages: semver: 7.6.0 strip-ansi: 6.0.1 tiny-invariant: 1.3.3 - typescript: 5.4.3 + typescript: 5.4.4 vite: 5.2.8(@types/node@20.12.4) vscode-languageclient: 7.0.0 vscode-languageserver: 7.0.0 diff --git a/src/pages/Discover.tsx b/src/pages/Discover.tsx index fa61eb83..4338e951 100644 --- a/src/pages/Discover.tsx +++ b/src/pages/Discover.tsx @@ -52,6 +52,10 @@ const categories: Category[] = [ name: "Top Rated", endpoint: "/movie/top_rated?language=en-US", }, + { + name: "Most Popular", + endpoint: "/movie/popular?language=en-US", + }, ]; export function Discover() { @@ -119,8 +123,8 @@ export function Discover() { [data.genres[i], data.genres[j]] = [data.genres[j], data.genres[i]]; } - // Fetch only the first 5 TV show genres - setTVGenres(data.genres.slice(0, 5)); + // Fetch only the first 6 TV show genres + setTVGenres(data.genres.slice(0, 6)); } catch (error) { console.error("Error fetching TV show genres:", error); } @@ -384,8 +388,8 @@ export function Discover() { [data.genres[i], data.genres[j]] = [data.genres[j], data.genres[i]]; } - // Fetch only the first 5 genres - setGenres(data.genres.slice(0, 5)); + // Fetch only the first 6 genres + setGenres(data.genres.slice(0, 6)); } catch (error) { console.error("Error fetching genres:", error); }