├── .eslintrc.cjs
├── .gitignore
├── README.md
├── index.html
├── package-lock.json
├── package.json
├── postcss.config.js
├── public
├── 105.jpg
├── 27.jpg
├── 60.jpg
├── AI.png
├── applelogo.png
├── contactus.png
├── image.jpg
├── night.jpg
├── parasite.jpg
├── pic.jpg
├── sanf.jpg
└── vite.svg
├── src
├── App.css
├── App.jsx
├── GlobalContext.jsx
├── assets
│ └── react.svg
├── components
│ └── layout
│ │ ├── ErrorPage.jsx
│ │ ├── Footer.jsx
│ │ ├── HomeLayout.jsx
│ │ ├── NavBar.jsx
│ │ ├── Protected.jsx
│ │ └── Spinner.jsx
├── config
│ └── EnvironmentVariables.js
├── form
│ ├── Form1.jsx
│ └── ReactForm.jsx
├── index.css
├── loginPage
│ └── Login.jsx
├── main.jsx
├── pages
│ ├── about
│ │ ├── About.jsx
│ │ └── components
│ │ │ ├── Side1.jsx
│ │ │ ├── Side2.jsx
│ │ │ ├── Side3.jsx
│ │ │ ├── Side4.jsx
│ │ │ ├── Side5.jsx
│ │ │ └── SideNav.jsx
│ ├── admin
│ │ ├── Admin.jsx
│ │ ├── AdminLayout.jsx
│ │ ├── DashBoard.jsx
│ │ ├── Settings.jsx
│ │ └── Users.jsx
│ ├── animations
│ │ └── Select.jsx
│ ├── contact
│ │ └── Contact.jsx
│ ├── dynamic
│ │ └── Dynamic.jsx
│ ├── home
│ │ └── Home.jsx
│ ├── login
│ │ ├── Login.jsx
│ │ ├── Login2.jsx
│ │ └── SignUp.jsx
│ ├── movies
│ │ └── Movies.jsx
│ ├── pricing
│ │ └── Pricing.jsx
│ └── series
│ │ └── Series.jsx
├── registerPage
│ └── Register.jsx
├── store
│ └── useTheme.jsx
└── table
│ ├── MatReactTable.jsx
│ ├── Table.jsx
│ └── Table1.jsx
├── tailwind.config.js
└── vite.config.js
/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | env: { browser: true, es2020: true },
4 | extends: [
5 | 'eslint:recommended',
6 | 'plugin:react/recommended',
7 | 'plugin:react/jsx-runtime',
8 | 'plugin:react-hooks/recommended',
9 | ],
10 | ignorePatterns: ['dist', '.eslintrc.cjs'],
11 | parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
12 | settings: { react: { version: '18.2' } },
13 | plugins: ['react-refresh'],
14 | rules: {
15 | 'react/jsx-no-target-blank': 'off',
16 | 'react-refresh/only-export-components': [
17 | 'warn',
18 | { allowConstantExport: true },
19 | ],
20 | },
21 | }
22 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | pnpm-debug.log*
8 | lerna-debug.log*
9 |
10 | node_modules
11 | dist
12 | dist-ssr
13 | *.local
14 |
15 | # Editor directories and files
16 | .vscode/*
17 | !.vscode/extensions.json
18 | .idea
19 | .DS_Store
20 | *.suo
21 | *.ntvs*
22 | *.njsproj
23 | *.sln
24 | *.sw?
25 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # React + Vite
2 |
3 | This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4 |
5 | Currently, two official plugins are available:
6 |
7 | - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
8 | - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Vite + React
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "tailwind-project",
3 | "private": true,
4 | "version": "0.0.0",
5 | "type": "module",
6 | "scripts": {
7 | "dev": "vite",
8 | "build": "vite build",
9 | "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
10 | "preview": "vite preview"
11 | },
12 | "dependencies": {
13 | "axios": "^1.6.7",
14 | "framer-motion": "^11.0.18",
15 | "js-cookie": "^3.0.5",
16 | "material-react-table": "^2.12.1",
17 | "react": "^18.2.0",
18 | "react-dom": "^18.2.0",
19 | "react-hook-form": "^7.51.0",
20 | "react-icons": "^5.0.1",
21 | "react-router-dom": "^6.22.0",
22 | "zustand": "^4.5.2"
23 | },
24 | "devDependencies": {
25 | "@types/react": "^18.2.55",
26 | "@types/react-dom": "^18.2.19",
27 | "@vitejs/plugin-react": "^4.2.1",
28 | "autoprefixer": "^10.4.17",
29 | "eslint": "^8.56.0",
30 | "eslint-plugin-react": "^7.33.2",
31 | "eslint-plugin-react-hooks": "^4.6.0",
32 | "eslint-plugin-react-refresh": "^0.4.5",
33 | "postcss": "^8.4.35",
34 | "tailwindcss": "^3.4.1",
35 | "vite": "^5.1.0"
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/postcss.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | plugins: {
3 | tailwindcss: {},
4 | autoprefixer: {},
5 | },
6 | }
7 |
--------------------------------------------------------------------------------
/public/105.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kprashant544/Tailwind-Website-React/522343fcd554649559aacb6479861d68ed97559d/public/105.jpg
--------------------------------------------------------------------------------
/public/27.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kprashant544/Tailwind-Website-React/522343fcd554649559aacb6479861d68ed97559d/public/27.jpg
--------------------------------------------------------------------------------
/public/60.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kprashant544/Tailwind-Website-React/522343fcd554649559aacb6479861d68ed97559d/public/60.jpg
--------------------------------------------------------------------------------
/public/AI.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kprashant544/Tailwind-Website-React/522343fcd554649559aacb6479861d68ed97559d/public/AI.png
--------------------------------------------------------------------------------
/public/applelogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kprashant544/Tailwind-Website-React/522343fcd554649559aacb6479861d68ed97559d/public/applelogo.png
--------------------------------------------------------------------------------
/public/contactus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kprashant544/Tailwind-Website-React/522343fcd554649559aacb6479861d68ed97559d/public/contactus.png
--------------------------------------------------------------------------------
/public/image.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kprashant544/Tailwind-Website-React/522343fcd554649559aacb6479861d68ed97559d/public/image.jpg
--------------------------------------------------------------------------------
/public/night.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kprashant544/Tailwind-Website-React/522343fcd554649559aacb6479861d68ed97559d/public/night.jpg
--------------------------------------------------------------------------------
/public/parasite.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kprashant544/Tailwind-Website-React/522343fcd554649559aacb6479861d68ed97559d/public/parasite.jpg
--------------------------------------------------------------------------------
/public/pic.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kprashant544/Tailwind-Website-React/522343fcd554649559aacb6479861d68ed97559d/public/pic.jpg
--------------------------------------------------------------------------------
/public/sanf.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kprashant544/Tailwind-Website-React/522343fcd554649559aacb6479861d68ed97559d/public/sanf.jpg
--------------------------------------------------------------------------------
/public/vite.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/App.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kprashant544/Tailwind-Website-React/522343fcd554649559aacb6479861d68ed97559d/src/App.css
--------------------------------------------------------------------------------
/src/App.jsx:
--------------------------------------------------------------------------------
1 | import { Routes, Route } from "react-router-dom";
2 | import HomeLayout from "./components/layout/HomeLayout";
3 | // import About from "./pages/about/About";
4 | import Contact from "./pages/contact/Contact";
5 | import ErrorPage from "./components/layout/ErrorPage";
6 | import Pricing from "./pages/pricing/Pricing";
7 | import Movies from "./pages/movies/Movies";
8 | import Series from "./pages/series/Series";
9 | import Home from "./pages/home/Home";
10 | // import Login from "./pages/login/Login";
11 | import Login2 from "./pages/login/Login2";
12 | import SignUp from "./pages/login/SignUp";
13 | import Admin from "./pages/admin/Admin";
14 | import Protected from "./components/layout/Protected";
15 | import AdminLayout from "./pages/admin/AdminLayout";
16 | import Users from "./pages/admin/Users";
17 | import Settings from "./pages/admin/Settings";
18 | import DashBoard from "./pages/admin/DashBoard";
19 | import Dynamic from "./pages/dynamic/Dynamic";
20 | import About from "./pages/about/About";
21 | import Side1 from "./pages/about/components/Side1";
22 | import GlobalContext from "./GlobalContext.jsx";
23 | import { useState } from "react";
24 | import ReactForm from "./form/ReactForm.jsx";
25 | import Table from "./table/Table.jsx";
26 | import MatReactTable from "./table/MatReactTable.jsx";
27 | import Form1 from "./form/Form1.jsx";
28 | import Login from "./loginPage/Login.jsx";
29 | import Register from "./registerPage/Register.jsx";
30 | import Select from "./pages/animations/Select.jsx";
31 |
32 | function App() {
33 | const [theme, setTheme] = useState({
34 | color: "white",
35 | backgroundColor: "black",
36 | });
37 | return (
38 | <>
39 |
40 |
41 | }>
42 | } />
43 | } />
44 |
48 |
49 |
50 | }
51 | />
52 |
53 | } />
54 | } />
55 | } />
56 | } />
57 | } />
58 | } />
59 | } />
60 | } />
61 | } />
62 | } />
63 | } />
64 | } />
65 | } />
66 | } />
67 |
68 | } />
69 |
70 | {/* Route for the sign in and sign up */}
71 | }>
72 | } />
73 | }>
74 | } />
75 | } />
76 | } />
77 |
78 |
79 |
80 |
81 | >
82 | );
83 | }
84 |
85 | export default App;
86 |
--------------------------------------------------------------------------------
/src/GlobalContext.jsx:
--------------------------------------------------------------------------------
1 | import { createContext } from "react";
2 |
3 | const GlobalContext = createContext();
4 |
5 | export default GlobalContext;
6 |
--------------------------------------------------------------------------------
/src/assets/react.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/components/layout/ErrorPage.jsx:
--------------------------------------------------------------------------------
1 | import { NavLink } from "react-router-dom";
2 | function ErrorPage() {
3 | return (
4 | <>
5 |
6 |
7 |
8 | {/* image - start */}
9 |
10 |

15 |
16 | {/* image - end */}
17 | {/* content - start */}
18 |
19 |
20 | Error 404
21 |
22 |
23 | Page not found
24 |
25 |
26 |
37 |
38 | {/* content - end */}
39 |
40 |
41 |
42 | >
43 | );
44 | }
45 |
46 | export default ErrorPage;
47 |
--------------------------------------------------------------------------------
/src/components/layout/Footer.jsx:
--------------------------------------------------------------------------------
1 | import useTheme from "../../store/useTheme";
2 |
3 | function Footer() {
4 | const { theme } = useTheme();
5 | console.log(theme);
6 | return (
7 | <>
8 |
86 | >
87 | );
88 | }
89 |
90 | export default Footer;
91 |
--------------------------------------------------------------------------------
/src/components/layout/HomeLayout.jsx:
--------------------------------------------------------------------------------
1 | import { Outlet } from "react-router-dom";
2 | import NavBar from "./NavBar";
3 | import Footer from "./Footer";
4 |
5 | function HomeLayout() {
6 | return (
7 | <>
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | >
17 | );
18 | }
19 |
20 | export default HomeLayout;
21 |
--------------------------------------------------------------------------------
/src/components/layout/NavBar.jsx:
--------------------------------------------------------------------------------
1 | import { NavLink } from "react-router-dom";
2 | import { FiSearch } from "react-icons/fi";
3 | // import GlobalContext from "../../GlobalContext";
4 | // import { useContext } from "react";
5 | import useTheme from "../../store/useTheme";
6 |
7 | function NavBar() {
8 | // const contextValues = useContext(GlobalContext);
9 | // const { theme, setTheme } = contextValues;
10 | // const { color, backgroundcolor } = theme;
11 | const { setTheme, theme, setDefault1 } = useTheme();
12 | console.log(theme);
13 |
14 | // function onSelectTheme(e) {
15 |
16 | // const value = e.target.value;
17 | // console.log(theme);
18 |
19 | // if (value === "theme1") {
20 | // setTheme({ backgroundcolor: "red", color: "yellow" });
21 | // } else if (value === "theme2") {
22 | // setTheme({ backgroundcolor: "blue", color: "white" });
23 | // } else if (value === "theme3") {
24 | // setTheme({ backgroundcolor: "green", color: "white" });
25 | // } else {
26 | // setTheme({ backgroundcolor: "black", color: "white" });
27 | // }
28 | // }
29 |
30 | //function for zustand(e)
31 | function onZustand(e) {
32 | const value = e.target.value;
33 |
34 | if (value === "lightblue") {
35 | setTheme({ color: "white", bgColor: "blue" });
36 | } else if (value === "lightgreen") {
37 | setTheme({ color: "white", bgColor: "green" });
38 | } else {
39 | setDefault1();
40 | }
41 | }
42 |
43 | return (
44 | <>
45 |
107 | >
108 | );
109 | }
110 |
111 | export default NavBar;
112 |
--------------------------------------------------------------------------------
/src/components/layout/Protected.jsx:
--------------------------------------------------------------------------------
1 | import Cookies from "js-cookie";
2 | import { Navigate, Outlet } from "react-router-dom";
3 |
4 | function Protected() {
5 | const token = Cookies.get("token");
6 |
7 | return token ? : ;
8 | }
9 |
10 | export default Protected;
11 |
--------------------------------------------------------------------------------
/src/components/layout/Spinner.jsx:
--------------------------------------------------------------------------------
1 | function Spinner() {
2 | return (
3 |
23 | );
24 | }
25 |
26 | export default Spinner;
27 |
--------------------------------------------------------------------------------
/src/config/EnvironmentVariables.js:
--------------------------------------------------------------------------------
1 | export const API_URL = "http://localhost:5000";
2 |
3 | export const API_URL1 = "http://localhost:5001";
--------------------------------------------------------------------------------
/src/form/Form1.jsx:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 | import { useForm } from "react-hook-form";
3 |
4 | import { useEffect, useState } from "react";
5 | import { API_URL1 } from "../config/EnvironmentVariables";
6 |
7 | function Form1() {
8 | const [showdata, setShowData] = useState([]);
9 | const [isUpdate, setIsUpdate] = useState(false);
10 | const [updateId, setUpdateId] = useState(null);
11 | const {
12 | register,
13 | handleSubmit,
14 | setValue,
15 | formState: { errors },
16 | } = useForm();
17 |
18 | /* GET method */
19 | async function dataTable() {
20 | try {
21 | let xyz = await axios.get(`${API_URL1}/prisma`);
22 | console.log(xyz.data);
23 | setShowData(xyz.data);
24 | } catch (err) {
25 | window.alert(err.message);
26 | console.log(err.message);
27 | }
28 | }
29 |
30 | /* Post for the Table1 jsx file */
31 | async function finalSubmission(data) {
32 | try {
33 | console.log(data);
34 | const response = await axios({
35 | method: "post",
36 | url: "http://localhost:5001/prisma",
37 | data: data,
38 | });
39 | console.log(response.data);
40 | dataTable();
41 | } catch (err) {
42 | console.log(err.response.data);
43 | }
44 | }
45 | console.log(errors);
46 |
47 | /* Delete method */
48 | async function deleteRow(data) {
49 | try {
50 | console.log(data);
51 | const response = await axios({
52 | method: "delete",
53 | url: `http://localhost:5001/prisma/${data}`,
54 | data: data,
55 | });
56 | dataTable();
57 | console.log(response.data);
58 | } catch (err) {
59 | console.log(err);
60 | }
61 | }
62 |
63 | /* Put(Update) Method */
64 | async function updateRow(data) {
65 | try {
66 | console.log("update", data);
67 | const response = await axios({
68 | method: "put",
69 | url: `http://localhost:5001/prisma/update/${updateId}}`,
70 | data: { name: data.name, email: data.email },
71 | });
72 | dataTable();
73 | console.log(response.data);
74 | } catch (err) {
75 | console.log(err);
76 | }
77 | }
78 |
79 | /* Function to handle user selection */
80 | const handleSelect = (data) => {
81 | console.log(data);
82 | setIsUpdate(true);
83 | setUpdateId(data.id);
84 | setValue("name", data.name);
85 | setValue("email", data.email);
86 | };
87 |
88 | useEffect(() => {
89 | dataTable();
90 | }, []);
91 | return (
92 | <>
93 |
94 |
Form Example
95 |
152 |
153 |
154 |
155 |
156 | Id |
157 | Name |
158 | Email |
159 | Action |
160 |
161 |
162 |
163 | {showdata.map((value, index) => (
164 |
165 |
166 | {index + 1}
167 | |
168 |
169 | {value.name}
170 | |
171 |
172 | {value.email}
173 | |
174 |
175 |
176 |
182 |
188 |
189 | |
190 |
191 | ))}
192 |
193 |
194 |
195 |
196 | >
197 | );
198 | }
199 |
200 | export default Form1;
201 |
--------------------------------------------------------------------------------
/src/form/ReactForm.jsx:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 | import { useEffect, useState } from "react";
3 | import { useForm } from "react-hook-form";
4 | import Spinner from "../components/layout/Spinner";
5 | import { API_URL } from "../config/EnvironmentVariables";
6 | function ReactForm() {
7 | const [loading, setLoading] = useState("");
8 | // const [successmessage, setSuccessMessage] = useState("");
9 | const [formData, setFormData] = useState("");
10 |
11 | const {
12 | register,
13 | handleSubmit,
14 | formState: { errors },
15 | } = useForm();
16 |
17 | /* Post for the react hook form */
18 | async function finalSubmission(data) {
19 | try {
20 | console.log(data);
21 | // setSuccessMessage("");
22 | setLoading(true);
23 | const response = await axios({
24 | method: "post",
25 | url: "http://localhost:5000/reacthookform",
26 | data: data,
27 | });
28 | console.log(response.data);
29 | setFormData(response.data);
30 | // setSuccessMessage(response.data);
31 | } catch (err) {
32 | console.log(err.response.data);
33 | } finally {
34 | setLoading(false);
35 | }
36 | }
37 | console.log(errors);
38 |
39 | async function tableData() {
40 | try {
41 | let abc = await axios.get(`${API_URL}/tableData`);
42 | console.log(abc.data);
43 | } catch (err) {
44 | window.alert(err.message);
45 | console.log(err.message);
46 | }
47 | }
48 |
49 | useEffect(() => {
50 | tableData();
51 | }, []);
52 |
53 | return (
54 | <>
55 |
56 |
185 |
186 |
Data from Backend:
187 |
188 | {Object.entries(formData).map(([key, value]) => (
189 |
190 |
{key === "agree" ? "Agree to terms" : key}:
191 | {typeof value === "boolean" ? (value ? "yes" : "no") : value}
192 |
193 | ))}
194 |
195 |
196 | >
197 | );
198 | }
199 |
200 | export default ReactForm;
201 |
--------------------------------------------------------------------------------
/src/index.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
--------------------------------------------------------------------------------
/src/loginPage/Login.jsx:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 | import Cookies from "js-cookie";
3 | import { useForm } from "react-hook-form";
4 | import { Navigate, useNavigate } from "react-router-dom";
5 | import useTheme from "../store/useTheme";
6 | function Login() {
7 | const { color, bgColor, setColor, setDefault } = useTheme();
8 | console.log(color, bgColor);
9 | const cookie = Cookies.get("token");
10 | const navigate = useNavigate();
11 | const {
12 | register,
13 | handleSubmit,
14 |
15 | formState: { errors },
16 | } = useForm();
17 |
18 | /* Post method for Login Page */
19 | async function loginPost(data) {
20 | try {
21 | const response = await axios({
22 | method: "post",
23 | url: "http://localhost:5001/auth/login1",
24 | data: { email: data.email, password: data.password },
25 | });
26 | console.log(response);
27 | Cookies.set("token", response.data.token, { path: "/" });
28 | navigate("/admin");
29 | } catch (err) {
30 | console.log(err.response.data);
31 | }
32 | }
33 | return (
34 | <>
35 |
36 |
37 | {!cookie ? (
38 |
39 |
40 |
82 |
83 |
84 | ) : (
85 |
86 | )}
87 | >
88 | );
89 | }
90 |
91 | export default Login;
92 |
--------------------------------------------------------------------------------
/src/main.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import ReactDOM from "react-dom/client";
3 | import App from "./App.jsx";
4 | import "./index.css";
5 | import { BrowserRouter } from "react-router-dom";
6 |
7 | ReactDOM.createRoot(document.getElementById("root")).render(
8 |
9 |
10 |
11 |
12 |
13 | );
14 |
--------------------------------------------------------------------------------
/src/pages/about/About.jsx:
--------------------------------------------------------------------------------
1 | import { useContext } from "react";
2 | import SideNav from "./components/SideNav";
3 | import GlobalContext from "../../GlobalContext";
4 |
5 | // eslint-disable-next-line react/prop-types
6 | function About({ children }) {
7 | const contextValues = useContext(GlobalContext);
8 | console.log(contextValues);
9 | return (
10 | <>
11 |
12 |
13 |
14 | {children ? children :
About page
}
15 |
16 |
17 | >
18 | );
19 | }
20 |
21 | export default About;
22 |
--------------------------------------------------------------------------------
/src/pages/about/components/Side1.jsx:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 | import { useEffect, useState } from "react";
3 | import { useParams } from "react-router-dom";
4 |
5 | function Side1() {
6 | const params = useParams();
7 | console.log(params.id);
8 | const [data, setData] = useState("");
9 | async function dynamicAbout() {
10 | try {
11 | const response = await axios({
12 | method: "get",
13 | url: `http://localhost:5000/about/${params.id}`,
14 | });
15 | console.log(response.data);
16 | setData(response.data);
17 | } catch (err) {
18 | console.log(err);
19 | }
20 | }
21 | useEffect(() => {
22 | dynamicAbout();
23 | }, [params]);
24 |
25 | return (
26 | <>
27 | {data.name}
28 | >
29 | );
30 | }
31 |
32 | export default Side1;
33 |
--------------------------------------------------------------------------------
/src/pages/about/components/Side2.jsx:
--------------------------------------------------------------------------------
1 | function Side2() {
2 | return Side2
;
3 | }
4 |
5 | export default Side2;
6 |
--------------------------------------------------------------------------------
/src/pages/about/components/Side3.jsx:
--------------------------------------------------------------------------------
1 | function Side3() {
2 | return Side3
;
3 | }
4 |
5 | export default Side3;
6 |
--------------------------------------------------------------------------------
/src/pages/about/components/Side4.jsx:
--------------------------------------------------------------------------------
1 | function Side4() {
2 | return Side4
;
3 | }
4 |
5 | export default Side4;
6 |
--------------------------------------------------------------------------------
/src/pages/about/components/Side5.jsx:
--------------------------------------------------------------------------------
1 | function Side5() {
2 | return Side5
;
3 | }
4 |
5 | export default Side5;
6 |
--------------------------------------------------------------------------------
/src/pages/about/components/SideNav.jsx:
--------------------------------------------------------------------------------
1 | import { NavLink } from "react-router-dom";
2 | function SideNav() {
3 | return (
4 | <>
5 |
6 |
7 | -
8 | Side 1
9 |
10 | -
11 | Side 2
12 |
13 | -
14 | Side 3
15 |
16 | -
17 | Side 4
18 |
19 | -
20 | Side 5
21 |
22 | -
23 | Side 6
24 |
25 | -
26 | Side 7
27 |
28 | -
29 | Side 8
30 |
31 | -
32 | Side9
33 |
34 | -
35 | Side 10
36 |
37 | -
38 | Side 11
39 |
40 | -
41 | Side 12
42 |
43 |
44 |
45 | >
46 | );
47 | }
48 |
49 | export default SideNav;
50 |
--------------------------------------------------------------------------------
/src/pages/admin/Admin.jsx:
--------------------------------------------------------------------------------
1 | import Cookies from "js-cookie";
2 | import { NavLink, Outlet, useNavigate } from "react-router-dom";
3 |
4 | function Admin() {
5 | const navigate = useNavigate();
6 |
7 | function logout() {
8 | Cookies.remove("token", { path: "/" });
9 | navigate("/login");
10 | }
11 | return (
12 | <>
13 |
14 |
15 |
Admin Panel
16 |
17 |
18 |
19 |
20 |
26 |
27 |
28 | {/* Main Content */}
29 |
30 | {/* Left Sidebar */}
31 |
32 |
Navigation
33 |
34 | -
35 | Dashboard
36 |
37 | -
38 | Users
39 |
40 | -
41 | Settings
42 |
43 |
44 |
45 |
46 | {/* Main Content Area */}
47 |
48 | Welcome, Admin!
49 |
50 | {/* Add your content here, like charts, tables, forms, etc. */}
51 |
52 |
53 |
56 |
57 | >
58 | );
59 | }
60 |
61 | export default Admin;
62 |
--------------------------------------------------------------------------------
/src/pages/admin/AdminLayout.jsx:
--------------------------------------------------------------------------------
1 | import { NavLink, Outlet } from "react-router-dom";
2 |
3 | function AdminLayout() {
4 | return (
5 | <>
6 |
7 | {/* Header */}
8 |
9 | Admin Panel
10 |
13 |
14 |
15 | {/* Main Content */}
16 |
17 | {/* Left Sidebar */}
18 |
19 |
Navigation
20 |
21 | -
22 | Dashboard
23 |
24 | -
25 | Users
26 |
27 | -
28 | Settings
29 |
30 |
31 |
32 |
33 | {/* Main Content Area */}
34 |
35 | Welcome, Admin!
36 |
37 | {/* Add your content here, like charts, tables, forms, etc. */}
38 |
39 |
40 |
41 | >
42 | );
43 | }
44 |
45 | export default AdminLayout;
46 |
--------------------------------------------------------------------------------
/src/pages/admin/DashBoard.jsx:
--------------------------------------------------------------------------------
1 | function DashBoard() {
2 | return ;
3 | }
4 |
5 | export default DashBoard;
6 |
--------------------------------------------------------------------------------
/src/pages/admin/Settings.jsx:
--------------------------------------------------------------------------------
1 | function Settings() {
2 | return Settings
;
3 | }
4 |
5 | export default Settings;
6 |
--------------------------------------------------------------------------------
/src/pages/admin/Users.jsx:
--------------------------------------------------------------------------------
1 | function Users() {
2 | return Users
;
3 | }
4 |
5 | export default Users;
6 |
--------------------------------------------------------------------------------
/src/pages/animations/Select.jsx:
--------------------------------------------------------------------------------
1 | function Select() {
2 | return Select
;
3 | }
4 |
5 | export default Select;
6 |
--------------------------------------------------------------------------------
/src/pages/contact/Contact.jsx:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 | import { useState } from "react";
3 |
4 | function Contact() {
5 | const [name, setName] = useState("");
6 | const [email, setEmail] = useState("");
7 | const [message, setMessage] = useState("");
8 | const [sendmessage, setSendMessage] = useState("");
9 | const [isticked, setIsTicked] = useState(false);
10 |
11 | const ButtonChange = () => {
12 | setIsTicked(!isticked);
13 | };
14 |
15 | async function posted(e) {
16 | e.preventDefault();
17 | try {
18 | const data = await axios({
19 | method: "post",
20 | url: "http://localhost:5000/contact",
21 | data: { name: name, email: email, message: message },
22 | });
23 | console.log(data);
24 | setSendMessage(data.data);
25 | setName("");
26 | setEmail("");
27 | setMessage("");
28 | } catch (err) {
29 | console.log(err);
30 | }
31 | }
32 |
33 | return (
34 |
35 |
36 |
37 |
45 |
46 |
136 |
137 |
138 | );
139 | }
140 |
141 | export default Contact;
142 |
--------------------------------------------------------------------------------
/src/pages/dynamic/Dynamic.jsx:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 | import { useEffect, useState } from "react";
3 | import { useParams } from "react-router-dom";
4 |
5 | function Dynamic() {
6 | const params = useParams();
7 | console.log(params.id);
8 | const [data, setData] = useState("");
9 | async function dynamicCall() {
10 | try {
11 | const response = await axios({
12 | method: "get",
13 | url: `http://localhost:5000/dynamic/${params.id}`,
14 | });
15 | console.log(response.data);
16 | setData(response.data);
17 | } catch (err) {
18 | console.log(err);
19 | }
20 | }
21 | useEffect(() => {
22 | dynamicCall();
23 | }, []);
24 |
25 | return (
26 |
27 |
{data.name}
28 |
{data.roll}
29 |
30 | );
31 | }
32 |
33 | export default Dynamic;
34 |
--------------------------------------------------------------------------------
/src/pages/home/Home.jsx:
--------------------------------------------------------------------------------
1 | import { motion } from "framer-motion";
2 | function Home() {
3 | return (
4 |
5 |
6 | {/*
Parasite
*/}
7 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
55 |
56 |
57 |
Latest Series
58 |
59 |

60 |

61 |

62 |

63 |

64 |

65 |
66 |
67 |
68 | );
69 | }
70 |
71 | export default Home;
72 |
--------------------------------------------------------------------------------
/src/pages/login/Login.jsx:
--------------------------------------------------------------------------------
1 | import { useState } from "react";
2 |
3 | function Login() {
4 | // const [name, setName] = useState("");
5 | // const [email, setEmail] = useState("");
6 | // const [gender, setGender] = useState("");
7 | // const [country, setCountry] = useState("");
8 | // const [bike, setBike] = useState("");
9 | // const [nameError, setNameError] = useState("");
10 | // const [emailError, setEmailError] = useState("");
11 | // const [genderError, setGenderError] = useState("");
12 | // const [countryError, setCountryError] = useState("");
13 | // const [bikeError, setBikeError] = useState("");
14 |
15 | const [FormData, setFormData] = useState({
16 | name: "",
17 | gender: "",
18 | email: "",
19 | country: "",
20 | bike: "",
21 | });
22 | const [formError, setFormError] = useState({
23 | nameError: "",
24 | genderError: "",
25 | emailError: "",
26 | countryError: "",
27 | bikeError: "",
28 | });
29 |
30 | function onClick(e) {
31 | e.preventDefault;
32 | setFormError({
33 | nameError: "",
34 | genderError: "",
35 | emailError: "",
36 | countryError: "",
37 | bikeError: "",
38 | });
39 |
40 | if (!FormData.name) {
41 | setFormError((state) => {
42 | return { ...state, nameError: "It's a Name Error" };
43 | });
44 | }
45 | if (!FormData.gender) {
46 | setFormError((state) => {
47 | return { ...state, genderError: " Hey select one of the above gender" };
48 | });
49 | }
50 | if (!FormData.email) {
51 | setFormError((state) => {
52 | return { ...state, emailError: " Enter valid email" };
53 | });
54 | }
55 | if (!FormData.country) {
56 | setFormError((state) => {
57 | return { ...state, countryError: " Please select a country" };
58 | });
59 | }
60 | if (!FormData.bike) {
61 | setFormError((state) => {
62 | return { ...state, bikeError: " Want a ride? Choose any one" };
63 | });
64 | }
65 | }
66 |
67 | console.log(FormData);
68 | return (
69 |
70 |
71 |
Wanna ride your dream?
72 |
73 | Fill the form below:
74 |
75 |
76 |
172 |
173 | );
174 | }
175 |
176 | export default Login;
177 |
178 | // async function posted(e) {
179 | // e.preventdefault();
180 | // try {
181 | // const data = await axios({
182 | // method: "post",
183 | // url: "http://localhost:5000/posted",
184 | // });
185 | // console.log(data);
186 | // } catch (err) {
187 | // console.log(err);
188 |
--------------------------------------------------------------------------------
/src/pages/login/Login2.jsx:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 | import Cookies from "js-cookie";
3 | import { useState } from "react";
4 | import { NavLink, Navigate, useNavigate } from "react-router-dom";
5 |
6 | function Login2() {
7 | const cookie = Cookies.get("token");
8 | const navigate = useNavigate();
9 | const [username, setUsername] = useState("");
10 | const [password, setPassword] = useState("");
11 | const [error, setError] = useState("");
12 | const [successmessage, setSuccessMessage] = useState("");
13 |
14 | async function onSubmit(e) {
15 | e.preventDefault();
16 | try {
17 | const response = await axios({
18 | method: "post",
19 | url: "http://localhost:5000/login",
20 | data: { username, password },
21 | });
22 | console.log(response);
23 | Cookies.set("token", response.data.token, { path: "/" });
24 | setError("");
25 | setSuccessMessage(response.data);
26 | navigate("/admin");
27 | } catch (err) {
28 | console.log(err.response.data);
29 | setSuccessMessage("");
30 | setError(err.response.data);
31 | }
32 | }
33 | return (
34 | <>
35 | {!cookie ? (
36 |
37 |
107 |
108 | ) : (
109 |
110 | )}
111 | >
112 | );
113 | }
114 |
115 | export default Login2;
116 |
--------------------------------------------------------------------------------
/src/pages/login/SignUp.jsx:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 | import { useState } from "react";
3 | import { NavLink } from "react-router-dom";
4 |
5 | function SignUp() {
6 | const [username, setUsername] = useState("");
7 | const [password, setPassword] = useState("");
8 | const [error, setError] = useState("");
9 | const [successmessage, setSuccessMessage] = useState("");
10 | const [confirmpassword, setConfirmPassword] = useState("");
11 |
12 | async function onSubmit(e) {
13 | e.preventDefault();
14 | if (password !== confirmpassword) {
15 | setError("Passwords does not match");
16 | return;
17 | }
18 | try {
19 | const response = await axios({
20 | method: "post",
21 | url: "http://localhost:5000/signup",
22 | data: { username, password },
23 | });
24 | console.log(response);
25 | setError("");
26 | setSuccessMessage(response.data);
27 | } catch (err) {
28 | console.log(err.response.data);
29 | setSuccessMessage("");
30 | setError(err.response.data);
31 | }
32 | }
33 | return (
34 | <>
35 |
111 | >
112 | );
113 | }
114 |
115 | export default SignUp;
116 |
--------------------------------------------------------------------------------
/src/pages/movies/Movies.jsx:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 | import { useEffect, useState } from "react";
3 | import { API_URL } from "../../config/EnvironmentVariables";
4 |
5 | function Movies() {
6 | const [data, setData] = useState("");
7 | const [friday, setFriday] = useState("");
8 |
9 | // let myPromise = new Promise(function (myresolve, myreject) {
10 | // let value = 1;
11 | // if (value == 1) {
12 | // myresolve("error solved");
13 | // } else {
14 | // myreject("error occured");
15 | // }
16 | // });
17 | // myPromise.then(
18 | // function (value) {
19 | // console.log(value);
20 | // },
21 | // function (err) {
22 | // console.log(err);
23 | // }
24 | // );
25 |
26 | // async function test() {
27 | // let a = await fetch("https://dog.ceo/api/breeds/image/random").then((res) =>
28 | // res.json()
29 | // );
30 | // console.log(a);
31 | // setData(a);
32 | // }
33 |
34 | async function test() {
35 | try {
36 | let data = await axios.get(`${API_URL}/msg`);
37 | console.log(data.data);
38 | setData(data.data);
39 | } catch (err) {
40 | window.alert(err.message);
41 | console.log(err.message);
42 | }
43 | }
44 | console.log(data);
45 |
46 | async function test1() {
47 | try {
48 | let abc = await axios.get(`${API_URL}/heavy`);
49 | console.log(abc.data);
50 | setFriday(abc.data);
51 | } catch (err) {
52 | window.alert(err.message);
53 | console.log(err.message);
54 | }
55 | }
56 |
57 | useEffect(() => {
58 | test();
59 | test1();
60 | console.log("This is my render");
61 | }, []);
62 |
63 | return (
64 | <>
65 |
71 |
72 | {data.name}
73 |
74 |
80 |
81 |
82 |
83 |
84 | >
85 | );
86 | }
87 |
88 | export default Movies;
89 |
--------------------------------------------------------------------------------
/src/pages/pricing/Pricing.jsx:
--------------------------------------------------------------------------------
1 | function Pricing() {
2 | return (
3 |
4 |
5 |
6 |
7 |
8 | Pricing
9 |
10 |
11 | Whatever cardigan tote bag tumblr hexagon brooklyn asymmetrical.
12 |
13 |
14 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | START
25 |
26 |
27 | Free
28 |
29 |
30 |
31 |
42 |
43 | Vexillologist pitchfork
44 |
45 |
46 |
47 |
58 |
59 | Tumeric plaid portland
60 |
61 |
62 |
63 |
74 |
75 | Mixtape chillwave tumeric
76 |
77 |
91 |
92 | Literally you probably have not heard of them jean shorts.
93 |
94 |
95 |
96 |
97 |
98 |
99 | POPULAR
100 |
101 |
102 | PRO
103 |
104 |
105 | $38
106 |
107 | /mo
108 |
109 |
110 |
111 |
112 |
123 |
124 | Vexillologist pitchfork
125 |
126 |
127 |
128 |
139 |
140 | Tumeric plaid portland
141 |
142 |
143 |
144 |
155 |
156 | Hexagon neutra unicorn
157 |
158 |
159 |
160 |
171 |
172 | Mixtape chillwave tumeric
173 |
174 |
188 |
189 | Literally you probably have not heard of them jean shorts.
190 |
191 |
192 |
193 |
194 |
195 |
196 | BUSINESS
197 |
198 |
199 | $56
200 |
201 | /mo
202 |
203 |
204 |
205 |
206 |
217 |
218 | Vexillologist pitchfork
219 |
220 |
221 |
222 |
233 |
234 | Tumeric plaid portland
235 |
236 |
237 |
238 |
249 |
250 | Hexagon neutra unicorn
251 |
252 |
253 |
254 |
265 |
266 | Vexillologist pitchfork
267 |
268 |
269 |
270 |
281 |
282 | Mixtape chillwave tumeric
283 |
284 |
298 |
299 | Literally you probably have not heard of them jean shorts.
300 |
301 |
302 |
303 |
304 |
305 |
306 | SPECIAL
307 |
308 |
309 | $72
310 |
311 | /mo
312 |
313 |
314 |
315 |
316 |
327 |
328 | Vexillologist pitchfork
329 |
330 |
331 |
332 |
343 |
344 | Tumeric plaid portland
345 |
346 |
347 |
348 |
359 |
360 | Hexagon neutra unicorn
361 |
362 |
363 |
364 |
375 |
376 | Vexillologist pitchfork
377 |
378 |
379 |
380 |
391 |
392 | Mixtape chillwave tumeric
393 |
394 |
408 |
409 | Literally you probably have not heard of them jean shorts.
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 | );
418 | }
419 |
420 | export default Pricing;
421 |
--------------------------------------------------------------------------------
/src/pages/series/Series.jsx:
--------------------------------------------------------------------------------
1 | function Series() {
2 | return Series
;
3 | }
4 |
5 | export default Series;
6 |
--------------------------------------------------------------------------------
/src/registerPage/Register.jsx:
--------------------------------------------------------------------------------
1 | import { useEffect, useState } from "react";
2 | import { useForm } from "react-hook-form";
3 | import { API_URL1 } from "../config/EnvironmentVariables";
4 | import axios from "axios";
5 | // import useTheme from "../store/useTheme";
6 |
7 | // import { useNavigate } from "react-router-dom";
8 |
9 | function Register() {
10 | // const navigate = useNavigate();
11 |
12 | // const { color, bgColor, setColor, setDefault1 } = useTheme();
13 | // console.log(color, bgColor);
14 | const [registerdata, setRegisterData] = useState([]);
15 | const {
16 | register,
17 | handleSubmit,
18 |
19 | formState: { errors },
20 | } = useForm();
21 |
22 | async function onSubmit(data) {
23 | try {
24 | const response = await axios({
25 | method: "post",
26 | url: "http://localhost:5001/auth/register",
27 | data: { name: data.name, email: data.email, password: data.password },
28 | });
29 | console.log(response.data);
30 | registerTable();
31 |
32 | // navigate("/login1");
33 | } catch (err) {
34 | console.log(err.response.data);
35 | }
36 | }
37 |
38 | /* GET method */
39 | async function registerTable() {
40 | try {
41 | let xyz = await axios.get(`${API_URL1}/auth/prisma`);
42 | console.log(xyz.data);
43 | setRegisterData(xyz.data);
44 | } catch (err) {
45 | window.alert(err.message);
46 | console.log(err.message);
47 | }
48 | }
49 |
50 | useEffect(() => {
51 | registerTable();
52 | }, []);
53 |
54 | return (
55 | <>
56 |
57 | {/*
60 |
61 |
*/}
62 |
63 |
64 |
126 |
127 |
128 |
129 |
130 |
131 | Id |
132 | Name |
133 | Email |
134 |
135 |
136 |
137 | {registerdata.map((value, index) => (
138 |
139 |
140 | {index}
141 | |
142 |
143 | {value.name}
144 | |
145 |
146 | {value.email}
147 | |
148 | |
149 |
150 | ))}
151 |
152 |
153 |
154 |
155 |
156 | >
157 | );
158 | }
159 |
160 | export default Register;
161 |
--------------------------------------------------------------------------------
/src/store/useTheme.jsx:
--------------------------------------------------------------------------------
1 | import Cookies from "js-cookie";
2 | import { create } from "zustand";
3 |
4 | /* Parse converts string values into objects */
5 | const cookieData = Cookies.get("theme") ? JSON.parse(Cookies.get("theme")) : {};
6 | const defaultColor = cookieData.color || "white";
7 | const defaultBgColor = cookieData.bgColor || "black";
8 |
9 | const useTheme = create((set) => ({
10 | theme: { color: defaultColor, bgColor: defaultBgColor },
11 |
12 | setTheme: (data) => {
13 | Cookies.set("theme", JSON.stringify(data));
14 | set({ theme: { color: data.color, bgColor: data.bgColor } });
15 | },
16 | setDefault1: () => {
17 | Cookies.remove("theme"),
18 | set({ theme: { color: defaultColor, bgColor: defaultBgColor } });
19 | },
20 | }));
21 |
22 | export default useTheme;
23 |
--------------------------------------------------------------------------------
/src/table/MatReactTable.jsx:
--------------------------------------------------------------------------------
1 | import { useEffect, useMemo, useState } from "react";
2 | import {
3 | MaterialReactTable,
4 | useMaterialReactTable,
5 | } from "material-react-table";
6 | import axios from "axios";
7 | import { API_URL } from "../config/EnvironmentVariables";
8 |
9 | function Example() {
10 | const [materialdata, setMaterialData] = useState("");
11 | async function matTable() {
12 | try {
13 | let abc = await axios.get(`${API_URL}/mattable`);
14 | console.log(abc.data);
15 | setMaterialData(abc.data);
16 | } catch (err) {
17 | window.alert(err.message);
18 | console.log(err.message);
19 | }
20 | }
21 |
22 | useEffect(() => {
23 | matTable();
24 | }, []);
25 |
26 | const columns = useMemo(
27 | () => [
28 | {
29 | accessorKey: "name.firstName", //access nested data with dot notation
30 | header: "First Name",
31 | size: 150,
32 | },
33 | {
34 | accessorKey: "name.lastName",
35 | header: "Last Name",
36 | size: 150,
37 | },
38 | {
39 | accessorKey: "address", //normal accessorKey
40 | header: "Address",
41 | size: 200,
42 | },
43 | {
44 | accessorKey: "city",
45 | header: "City",
46 | size: 150,
47 | },
48 | {
49 | accessorKey: "state",
50 | header: "State",
51 | size: 150,
52 | },
53 | ],
54 | []
55 | );
56 |
57 | const table = useMaterialReactTable({
58 | columns,
59 | data: materialdata, //data must be memoized or stable (useState, useMemo, defined outside of this component, etc.)
60 | });
61 |
62 | return (
63 | <>
64 |
65 | >
66 | );
67 | }
68 |
69 | export default Example;
70 |
--------------------------------------------------------------------------------
/src/table/Table.jsx:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 | import { useEffect, useState } from "react";
3 | import { API_URL } from "../config/EnvironmentVariables";
4 |
5 | function Table() {
6 | const [showtable, setShowTable] = useState([]);
7 | async function tableData() {
8 | try {
9 | let abc = await axios.get(`${API_URL}/tableData`);
10 | console.log(abc.data);
11 | setShowTable(abc.data);
12 | } catch (err) {
13 | window.alert(err.message);
14 | console.log(err.message);
15 | }
16 | }
17 |
18 | useEffect(() => {
19 | tableData();
20 | }, []);
21 |
22 | return (
23 | <>
24 |
25 |
26 |
27 |
28 | Name |
29 | Roll |
30 | Grade |
31 |
32 |
33 | {showtable.map((value, index) => (
34 |
35 | {value.name} |
36 | {value.roll} |
37 | {value.grade} |
38 |
39 | ))}
40 |
41 |
42 |
43 | >
44 | );
45 | }
46 |
47 | export default Table;
48 |
--------------------------------------------------------------------------------
/src/table/Table1.jsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kprashant544/Tailwind-Website-React/522343fcd554649559aacb6479861d68ed97559d/src/table/Table1.jsx
--------------------------------------------------------------------------------
/tailwind.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('tailwindcss').Config} */
2 | export default {
3 | content: [
4 | "./index.html",
5 | "./src/**/*.{js,ts,jsx,tsx}",
6 | ],
7 | theme: {
8 |
9 | extend: {
10 | colors:{
11 | transparent: 'transparent',
12 | current: 'currentColor',
13 | 'white': '#ffffff',
14 | 'purple': '#3f3cbb',
15 | 'midnight': '#121063',
16 | 'metal': '#565584',
17 | 'tahiti': '#3ab7bf',
18 | 'silver': '#ecebff',
19 | 'bubble-gum': '#ff77e9',
20 | 'bermuda': '#78dcca',
21 |
22 | }
23 | },
24 | },
25 | plugins: [],
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vitejs.dev/config/
5 | export default defineConfig({
6 | plugins: [react()],
7 | })
8 |
--------------------------------------------------------------------------------