From 6c4ea5e032ed10a9c570a052b146a6e43666ac1e Mon Sep 17 00:00:00 2001 From: shifinmalik <137679921+shifnmalik@users.noreply.github.com> Date: Sat, 27 Jul 2024 12:39:41 +0530 Subject: [PATCH 1/3] Genres list (#10) * profile-page * GenresList Complete * rework GenresList * fix(home): genre list --------- Co-authored-by: shifinmalik Co-authored-by: Muhammed-Rahif --- package-lock.json | 6 ----- src/App.css | 2 +- src/components/Home/GenresList.tsx | 34 ++++++++++++++++++++++++ src/components/{home => Home}/Header.tsx | 0 src/main.tsx | 2 +- src/pages/Home.tsx | 7 +++-- 6 files changed, 39 insertions(+), 12 deletions(-) create mode 100644 src/components/Home/GenresList.tsx rename src/components/{home => Home}/Header.tsx (100%) diff --git a/package-lock.json b/package-lock.json index 8b2d238..fce9230 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5789,12 +5789,6 @@ "jiti": "bin/jiti.js" } }, - "node_modules/jquery": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz", - "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==", - "peer": true - }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", diff --git a/src/App.css b/src/App.css index d66de34..0c7262b 100644 --- a/src/App.css +++ b/src/App.css @@ -13,7 +13,7 @@ html, body { - @apply h-full w-full bg-base-100; + @apply h-full w-full overflow-hidden bg-base-100; } .page { diff --git a/src/components/Home/GenresList.tsx b/src/components/Home/GenresList.tsx new file mode 100644 index 0000000..fff8b71 --- /dev/null +++ b/src/components/Home/GenresList.tsx @@ -0,0 +1,34 @@ +import { useState } from "react"; + +function GenresList() { + const menu = [ + { id: 1, name: "All" }, + { id: 2, name: "Action" }, + { id: 3, name: "Drama" }, + { id: 4, name: "Movie" }, + { id: 5, name: "Animation" }, + { id: 6, name: "Romance" }, + { id: 7, name: "Horror" }, + { id: 8, name: "Adventure" }, + { id: 9, name: "Fantasy" }, + { id: 10, name: "Thriller" }, + ]; + + const [active, setActive] = useState(menu[0].id); + + return ( +
+ {menu.map(({ name, id }) => ( +

setActive(id)} + > + {name} +

+ ))} +
+ ); +} + +export default GenresList; diff --git a/src/components/home/Header.tsx b/src/components/Home/Header.tsx similarity index 100% rename from src/components/home/Header.tsx rename to src/components/Home/Header.tsx diff --git a/src/main.tsx b/src/main.tsx index f5f887a..35e6a3b 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -24,7 +24,7 @@ createRoot(document.getElementById("root")!).render( {() as any} - + {/* */} , diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx index 15f6734..b491e50 100644 --- a/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -1,10 +1,9 @@ -import Header from "../components/home/Header"; +import GenresList from "../components/Home/GenresList"; export default function Home() { return ( -
-
- +
+
); } From b2decd04061a2e5dd5dadeba7816ed096b81f837 Mon Sep 17 00:00:00 2001 From: Muhammed-Rahif Date: Sat, 27 Jul 2024 14:41:40 +0530 Subject: [PATCH 2/3] fix(getting-started): carousel replaced with material-tailwind --- .env.sample | 1 + package-lock.json | 68 ------------------- package.json | 5 +- src/App.css | 2 +- src/components/GettingStarted/BottomSheet.tsx | 53 +++++++-------- src/components/Home/ActionMovies.tsx | 1 - src/components/Home/AdventureMovie.tsx | 1 - src/components/Home/ComedyMovie.tsx | 1 - src/components/Home/CrimeMovie.tsx | 1 - src/components/Home/GenresList.tsx | 22 +++--- src/components/Home/Header.tsx | 5 +- src/layout/BottomNavBar.tsx | 3 - src/layout/Layout.tsx | 2 +- src/main.tsx | 6 +- src/pages/Home.tsx | 2 +- src/pages/Login.tsx | 17 +---- src/pages/NotFound.tsx | 7 +- src/utils/utils.ts | 4 +- 18 files changed, 53 insertions(+), 148 deletions(-) create mode 100644 .env.sample diff --git a/.env.sample b/.env.sample new file mode 100644 index 0000000..75c3e2c --- /dev/null +++ b/.env.sample @@ -0,0 +1 @@ +VITE_TMDB_API_KEY=sample \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 023b975..b1d5c88 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,6 @@ "@capacitor/app": "^6.0.0", "@capacitor/core": "^6.1.1", "@material-tailwind/react": "^2.1.9", - "@splidejs/react-splide": "^0.7.12", "@tanstack/react-query": "^5.51.11", "@tanstack/react-query-devtools": "^5.51.11", "@uidotdev/usehooks": "^2.4.1", @@ -21,9 +20,7 @@ "react-dom": "^18.3.1", "react-hook-form": "^7.52.1", "react-router-dom": "^6.25.1", - "react-slick": "^0.30.2", "react-transition-group": "^4.4.5", - "slick-carousel": "^1.8.1", "xior": "^0.5.5" }, "devDependencies": { @@ -1943,19 +1940,6 @@ "win32" ] }, - "node_modules/@splidejs/react-splide": { - "version": "0.7.12", - "resolved": "https://registry.npmjs.org/@splidejs/react-splide/-/react-splide-0.7.12.tgz", - "integrity": "sha512-UfXH+j47jsMc4x5HA/aOwuuHPqn6y9+ZTNYPWDRD8iLKvIVMZlzq2unjUEvyDAU+TTVPZOXkG2Ojeoz0P4AkZw==", - "dependencies": { - "@splidejs/splide": "^4.1.3" - } - }, - "node_modules/@splidejs/splide": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/@splidejs/splide/-/splide-4.1.4.tgz", - "integrity": "sha512-5I30evTJcAJQXt6vJ26g2xEkG+l1nXcpEw4xpKh0/FWQ8ozmAeTbtniVtVmz2sH1Es3vgfC4SS8B2X4o5JMptA==" - }, "node_modules/@tailwindcss/typography": { "version": "0.5.13", "resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.13.tgz", @@ -4110,11 +4094,6 @@ "once": "^1.4.0" } }, - "node_modules/enquire.js": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/enquire.js/-/enquire.js-2.1.6.tgz", - "integrity": "sha512-/KujNpO+PT63F7Hlpu4h3pE3TokKRHN26JYmQpPyjkRD/N57R7bPDNojMXdi7uveAKjYB7yQnartCxZnFWr0Xw==" - }, "node_modules/entities": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", @@ -5878,14 +5857,6 @@ "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", "dev": true }, - "node_modules/json2mq": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/json2mq/-/json2mq-0.2.0.tgz", - "integrity": "sha512-SzoRg7ux5DWTII9J2qkrZrqV1gt+rTaoufMxEzXbS26Uid0NwaJd123HcoB80TgubEppxxIGdNxCx50fEoEWQA==", - "dependencies": { - "string-convert": "^0.2.0" - } - }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", @@ -6059,11 +6030,6 @@ "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": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==" - }, "node_modules/lodash.ismatch": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz", @@ -7917,22 +7883,6 @@ "react-dom": ">=16.8" } }, - "node_modules/react-slick": { - "version": "0.30.2", - "resolved": "https://registry.npmjs.org/react-slick/-/react-slick-0.30.2.tgz", - "integrity": "sha512-XvQJi7mRHuiU3b9irsqS9SGIgftIfdV5/tNcURTb5LdIokRA5kIIx3l4rlq2XYHfxcSntXapoRg/GxaVOM1yfg==", - "dependencies": { - "classnames": "^2.2.5", - "enquire.js": "^2.1.6", - "json2mq": "^0.2.0", - "lodash.debounce": "^4.0.8", - "resize-observer-polyfill": "^1.5.0" - }, - "peerDependencies": { - "react": "^0.14.0 || ^15.0.1 || ^16.0.0 || ^17.0.0 || ^18.0.0", - "react-dom": "^0.14.0 || ^15.0.1 || ^16.0.0 || ^17.0.0 || ^18.0.0" - } - }, "node_modules/react-transition-group": { "version": "4.4.5", "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", @@ -8355,11 +8305,6 @@ "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, - "node_modules/resize-observer-polyfill": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz", - "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==" - }, "node_modules/resolve": { "version": "1.22.8", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", @@ -8760,14 +8705,6 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/slick-carousel": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/slick-carousel/-/slick-carousel-1.8.1.tgz", - "integrity": "sha512-XB9Ftrf2EEKfzoQXt3Nitrt/IPbT+f1fgqBdoxO3W/+JYvtEOW6EgxnWfr9GH6nmULv7Y2tPmEX3koxThVmebA==", - "peerDependencies": { - "jquery": ">=1.8.0" - } - }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -8871,11 +8808,6 @@ "safe-buffer": "~5.2.0" } }, - "node_modules/string-convert": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/string-convert/-/string-convert-0.2.1.tgz", - "integrity": "sha512-u/1tdPl4yQnPBjnVrmdLo9gtuLvELKsAoRapekWggdiQNvvvum+jYF329d84NAa660KQw7pB2n36KrIKVoXa3A==" - }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", diff --git a/package.json b/package.json index 733e362..ad4f02e 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "homepage": "https://muhammed-rahif.github.io/The-Movieflix/", "scripts": { "dev": "vite --host", - "build": "tsc -b && vite build", + "build": "vite build # tsc -b && vite build", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview", "postinstall": "patch-package", @@ -20,7 +20,6 @@ "@capacitor/app": "^6.0.0", "@capacitor/core": "^6.1.1", "@material-tailwind/react": "^2.1.9", - "@splidejs/react-splide": "^0.7.12", "@tanstack/react-query": "^5.51.11", "@tanstack/react-query-devtools": "^5.51.11", "@uidotdev/usehooks": "^2.4.1", @@ -28,9 +27,7 @@ "react-dom": "^18.3.1", "react-hook-form": "^7.52.1", "react-router-dom": "^6.25.1", - "react-slick": "^0.30.2", "react-transition-group": "^4.4.5", - "slick-carousel": "^1.8.1", "xior": "^0.5.5" }, "devDependencies": { diff --git a/src/App.css b/src/App.css index 0c7262b..0a1aa18 100644 --- a/src/App.css +++ b/src/App.css @@ -13,7 +13,7 @@ html, body { - @apply h-full w-full overflow-hidden bg-base-100; + @apply bg-base-100; } .page { diff --git a/src/components/GettingStarted/BottomSheet.tsx b/src/components/GettingStarted/BottomSheet.tsx index 36e9c7f..65c6a9d 100644 --- a/src/components/GettingStarted/BottomSheet.tsx +++ b/src/components/GettingStarted/BottomSheet.tsx @@ -1,10 +1,6 @@ -import { Button } from "@material-tailwind/react"; -import { Options, Splide, SplideSlide } from "@splidejs/react-splide"; +import { Button, Carousel } from "@material-tailwind/react"; import { Link } from "react-router-dom"; -import "@splidejs/react-splide/css"; -import "@splidejs/react-splide/css/core"; - const title = ( <> Bring Free streaming to
@@ -16,15 +12,6 @@ const features = [ "Movieflix Original content production investment in creating high-quality series and movies trailer.", "Multiple Device Access Availabilty on smartphones,tablet,smart TVs etc.", ]; -const splideOptions: Options = { - perPage: 1, - arrows: false, - classes: { - pagination: "splide__pagination relative my-1", - }, - type: "loop", - autoplay: "pause", -}; export default function BottomSheet() { return ( @@ -32,23 +19,35 @@ export default function BottomSheet() {

{title}

- + <>} + nextArrow={() => <>} + className="h-auto" + navigation={({ setActiveIndex, activeIndex, length }) => ( +
+ {new Array(length).fill("").map((_, i) => ( + setActiveIndex(i)} + /> + ))} +
+ )} + > {features.map((feat, i) => ( - -

{feat}

-
+

+ {feat} +

))} -
+ - +
diff --git a/src/components/Home/ActionMovies.tsx b/src/components/Home/ActionMovies.tsx index c00535b..4806581 100644 --- a/src/components/Home/ActionMovies.tsx +++ b/src/components/Home/ActionMovies.tsx @@ -1,4 +1,3 @@ -import React from "react"; import { movieData } from "./SampleData"; function ActionMovies() { diff --git a/src/components/Home/AdventureMovie.tsx b/src/components/Home/AdventureMovie.tsx index 006752f..202dfd6 100644 --- a/src/components/Home/AdventureMovie.tsx +++ b/src/components/Home/AdventureMovie.tsx @@ -1,4 +1,3 @@ -import React from "react"; import { movieData } from "./SampleData"; function AdventureMovie() { return ( diff --git a/src/components/Home/ComedyMovie.tsx b/src/components/Home/ComedyMovie.tsx index b8db810..414a4f3 100644 --- a/src/components/Home/ComedyMovie.tsx +++ b/src/components/Home/ComedyMovie.tsx @@ -1,4 +1,3 @@ -import React from "react"; import { movieData } from "./SampleData"; function ComedyMovie() { return ( diff --git a/src/components/Home/CrimeMovie.tsx b/src/components/Home/CrimeMovie.tsx index 51edaf4..236cc25 100644 --- a/src/components/Home/CrimeMovie.tsx +++ b/src/components/Home/CrimeMovie.tsx @@ -1,4 +1,3 @@ -import React from "react"; import { movieData } from "./SampleData"; function CrimeMovie() { return ( diff --git a/src/components/Home/GenresList.tsx b/src/components/Home/GenresList.tsx index fff8b71..c432cea 100644 --- a/src/components/Home/GenresList.tsx +++ b/src/components/Home/GenresList.tsx @@ -17,16 +17,18 @@ function GenresList() { const [active, setActive] = useState(menu[0].id); return ( -
- {menu.map(({ name, id }) => ( -

setActive(id)} - > - {name} -

- ))} +
+
+ {menu.map(({ name, id }) => ( +

setActive(id)} + > + {name} +

+ ))} +
); } diff --git a/src/components/Home/Header.tsx b/src/components/Home/Header.tsx index 53d0d29..525d2bb 100644 --- a/src/components/Home/Header.tsx +++ b/src/components/Home/Header.tsx @@ -3,13 +3,12 @@ import { movieData } from "./SampleData"; function Header() { return ( -
+
{movieData.map((item, i) => ( diff --git a/src/layout/BottomNavBar.tsx b/src/layout/BottomNavBar.tsx index dd50e4f..0a622a2 100644 --- a/src/layout/BottomNavBar.tsx +++ b/src/layout/BottomNavBar.tsx @@ -39,9 +39,6 @@ export default function BottomNavBar() { className={`flex items-center justify-between rounded-full duration-300 ${isActive ? "" : "bg-transparent text-white"}`} variant={isActive ? "filled" : "text"} size="sm" - placeholder={undefined} - onPointerEnterCapture={undefined} - onPointerLeaveCapture={undefined} > diff --git a/src/layout/Layout.tsx b/src/layout/Layout.tsx index 71f8b67..2a79e34 100644 --- a/src/layout/Layout.tsx +++ b/src/layout/Layout.tsx @@ -16,7 +16,7 @@ export default function Layout() {
diff --git a/src/main.tsx b/src/main.tsx index 35e6a3b..fbffec7 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,8 +1,8 @@ -import React from "react"; +import React, { ReactElement } from "react"; import { createRoot } from "react-dom/client"; import { ButtonStyleTypes, ThemeProvider } from "@material-tailwind/react"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; -import { ReactQueryDevtools } from "@tanstack/react-query-devtools"; +// import { ReactQueryDevtools } from "@tanstack/react-query-devtools"; import { BrowserRouter } from "react-router-dom"; import App from "./App.tsx"; @@ -22,7 +22,7 @@ createRoot(document.getElementById("root")!).render( - {() as any} + {() as ReactElement} {/* */} diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx index 832e845..f0b559d 100644 --- a/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -9,11 +9,11 @@ export default function Home() { return (
+ -
); } diff --git a/src/pages/Login.tsx b/src/pages/Login.tsx index 3aa4745..af7e9f2 100644 --- a/src/pages/Login.tsx +++ b/src/pages/Login.tsx @@ -18,7 +18,7 @@ export default function Login() { return (
@@ -38,9 +38,6 @@ export default function Login() { icon={} {...register("username", { required: true })} error={Boolean(errors.username)} - onPointerEnterCapture={undefined} - onPointerLeaveCapture={undefined} - crossOrigin={undefined} /> } {...register("password", { required: true })} error={Boolean(errors.password)} - onPointerEnterCapture={undefined} - onPointerLeaveCapture={undefined} - crossOrigin={undefined} />
@@ -65,14 +59,7 @@ export default function Login() { to login here.
- +
diff --git a/src/pages/NotFound.tsx b/src/pages/NotFound.tsx index fc1b430..795e559 100644 --- a/src/pages/NotFound.tsx +++ b/src/pages/NotFound.tsx @@ -18,12 +18,7 @@ function NotFound() {

- diff --git a/src/utils/utils.ts b/src/utils/utils.ts index dc75661..67d0550 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -1,6 +1,6 @@ // https://stackoverflow.com/a/46545530/14781260 -export function shuffleArray(unshuffled: any[]) { - let shuffled = unshuffled +export function shuffleArray(unshuffled: unknown[]) { + const shuffled = unshuffled .map((value) => ({ value, sort: Math.random() })) .sort((a, b) => a.sort - b.sort) .map(({ value }) => value); From f760f60156ae3f059cf27019732c6402883f6c51 Mon Sep 17 00:00:00 2001 From: Muhammed-Rahif Date: Sat, 27 Jul 2024 14:50:49 +0530 Subject: [PATCH 3/3] fix(material-tailwind): version types issue https://github.com/creativetimofficial/material-tailwind/issues/528 https://github.com/creativetimofficial/material-tailwind/issues/427 --- README.md | 11 +++++++---- package-lock.json | 15 +++++++++++---- package.json | 4 ++-- src/main.tsx | 4 ++-- 4 files changed, 22 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index e1cdc89..966382d 100644 --- a/README.md +++ b/README.md @@ -17,14 +17,17 @@ If you are developing a production application, we recommend updating the config export default { // other rules... parserOptions: { - ecmaVersion: 'latest', - sourceType: 'module', - project: ['./tsconfig.json', './tsconfig.node.json', './tsconfig.app.json'], + ecmaVersion: "latest", + sourceType: "module", + project: ["./tsconfig.json", "./tsconfig.node.json", "./tsconfig.app.json"], tsconfigRootDir: __dirname, }, -} +}; ``` - Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked` - Optionally add `plugin:@typescript-eslint/stylistic-type-checked` - Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list + +https://github.com/creativetimofficial/material-tailwind/issues/528 +https://github.com/creativetimofficial/material-tailwind/issues/427 diff --git a/package-lock.json b/package-lock.json index b1d5c88..9dc02d4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,7 +28,7 @@ "@capacitor/cli": "^6.1.1", "@tailwindcss/typography": "^0.5.13", "@tanstack/eslint-plugin-query": "^5.51.12", - "@types/react": "^18.3.3", + "@types/react": "^18.2.9", "@types/react-dom": "^18.3.0", "@types/react-transition-group": "^4.4.10", "@typescript-eslint/eslint-plugin": "^7.15.0", @@ -2196,12 +2196,13 @@ "dev": true }, "node_modules/@types/react": { - "version": "18.3.3", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.3.tgz", - "integrity": "sha512-hti/R0pS0q1/xx+TsI73XIqk26eBsISZ2R0wUijXIngRK9R/e7Xw/cXVxQK7R5JjW+SV4zGcn5hXjudkN/pLIw==", + "version": "18.2.9", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.9.tgz", + "integrity": "sha512-pL3JAesUkF7PEQGxh5XOwdXGV907te6m1/Qe1ERJLgomojS6Ne790QiA7GUl434JEkFA2aAaB6qJ5z4e1zJn/w==", "dev": true, "dependencies": { "@types/prop-types": "*", + "@types/scheduler": "*", "csstype": "^3.0.2" } }, @@ -2223,6 +2224,12 @@ "@types/react": "*" } }, + "node_modules/@types/scheduler": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.23.0.tgz", + "integrity": "sha512-YIoDCTH3Af6XM5VuwGG/QL/CJqga1Zm3NkU3HZ4ZHK2fRMPYP1VczsTUqtsf43PH/iJNVlPHAo2oWX7BSdB2Hw==", + "dev": true + }, "node_modules/@types/slice-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@types/slice-ansi/-/slice-ansi-4.0.0.tgz", diff --git a/package.json b/package.json index ad4f02e..7591707 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "homepage": "https://muhammed-rahif.github.io/The-Movieflix/", "scripts": { "dev": "vite --host", - "build": "vite build # tsc -b && vite build", + "build": "tsc -b && vite build", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview", "postinstall": "patch-package", @@ -35,7 +35,7 @@ "@capacitor/cli": "^6.1.1", "@tailwindcss/typography": "^0.5.13", "@tanstack/eslint-plugin-query": "^5.51.12", - "@types/react": "^18.3.3", + "@types/react": "18.2.9", "@types/react-dom": "^18.3.0", "@types/react-transition-group": "^4.4.10", "@typescript-eslint/eslint-plugin": "^7.15.0", diff --git a/src/main.tsx b/src/main.tsx index fbffec7..eb56835 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,4 +1,4 @@ -import React, { ReactElement } from "react"; +import React from "react"; import { createRoot } from "react-dom/client"; import { ButtonStyleTypes, ThemeProvider } from "@material-tailwind/react"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; @@ -22,7 +22,7 @@ createRoot(document.getElementById("root")!).render( - {() as ReactElement} + {() as any} {/* */}