From d078de0d2721d4a4618080d4e3f68395f9885871 Mon Sep 17 00:00:00 2001 From: Mansi2007275 Date: Sat, 30 May 2026 00:54:14 +0530 Subject: [PATCH 1/5] Migrate React frontend from Create React App to Vite Signed-off-by: Mansi2007275 --- react-frontend/index.html | 15 + react-frontend/package.json | 13 +- react-frontend/public/index.html | 43 --- react-frontend/src/App.js | 27 +- react-frontend/src/App.jsx | 24 ++ .../src/components/FaqAccordion/Accordion.js | 18 +- .../src/components/FaqAccordion/Accordion.jsx | 17 + react-frontend/src/components/SearchBar.jsx | 21 ++ react-frontend/src/index.js | 14 - react-frontend/src/main.jsx | 24 ++ react-frontend/src/screens/Faq/Faq.jsx | 2 +- react-frontend/src/screens/Faq/faq_data.js | 310 +----------------- react-frontend/vite.config.js | 13 + 13 files changed, 131 insertions(+), 410 deletions(-) create mode 100644 react-frontend/index.html delete mode 100644 react-frontend/public/index.html create mode 100644 react-frontend/src/App.jsx create mode 100644 react-frontend/src/components/FaqAccordion/Accordion.jsx delete mode 100644 react-frontend/src/index.js create mode 100644 react-frontend/src/main.jsx create mode 100644 react-frontend/vite.config.js diff --git a/react-frontend/index.html b/react-frontend/index.html new file mode 100644 index 00000000..4fe56389 --- /dev/null +++ b/react-frontend/index.html @@ -0,0 +1,15 @@ + + + + + + + + React App + + + +
+ + + \ No newline at end of file diff --git a/react-frontend/package.json b/react-frontend/package.json index d9b3cbc5..8a04e7b7 100644 --- a/react-frontend/package.json +++ b/react-frontend/package.json @@ -10,6 +10,7 @@ "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", + "@vitejs/plugin-react": "^6.0.2", "prop-types": "^15.8.1", "react": "^18.2.0", "react-alice-carousel": "^2.9.1", @@ -17,15 +18,15 @@ "react-icons": "^5.2.1", "react-paginate": "^8.2.0", "react-router-dom": "^6.30.3", - "react-scripts": "5.0.1", "react-slick": "^0.30.2", "styled-components": "^6.1.11", + "vite": "^8.0.14", "web-vitals": "^2.1.4" }, "scripts": { - "start": "react-scripts start", - "build": "react-scripts build", - "test": "react-scripts test", + "dev": "vite", + "build": "vite build", + "preview": "vite preview", "eject": "react-scripts eject" }, "eslintConfig": { @@ -47,7 +48,11 @@ ] }, "devDependencies": { +<<<<<<< HEAD "@babel/plugin-proposal-private-property-in-object": "^7.21.11", +======= + "autoprefixer": "^10.5.0", +>>>>>>> 0784f61 (Migrate React frontend from Create React App to Vite) "tailwindcss": "^3.4.4" } } diff --git a/react-frontend/public/index.html b/react-frontend/public/index.html deleted file mode 100644 index aa069f27..00000000 --- a/react-frontend/public/index.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - React App - - - -
- - - diff --git a/react-frontend/src/App.js b/react-frontend/src/App.js index aff9d7bc..b536c40e 100644 --- a/react-frontend/src/App.js +++ b/react-frontend/src/App.js @@ -1,25 +1,2 @@ -import React from 'react' -import { BrowserRouter as Router, Route, Routes } from 'react-router-dom' -import './App.css' - -import Navbar from './components/Navbar/Navbar' -import Footer from './components/Footer/Footer' -import LandingPage from './screens/LandingPage' -import Faq from './screens/Faq/Faq' - -function App() { - return ( - - -
- - } /> - } /> - -
-