From d2771ee3f4a858ea8d524691bffbfbf9813e3c5b Mon Sep 17 00:00:00 2001 From: Anshuman Date: Sat, 18 May 2024 02:50:23 +0530 Subject: [PATCH] changes did --- .gitignore | 39 +++++++++++++++++++++++++++++++++++++++ src/App.css | 0 src/App.js | 35 +++++++++++++++++++++++++++++++++++ src/App.test.js | 8 ++++++++ src/index.css | 10 ++++++++++ src/index.js | 18 ++++++++++++++++++ src/logo.svg | 1 + src/pages/Login.js | 2 +- src/pages/Signup.js | 2 +- src/reportWebVitals.js | 13 +++++++++++++ src/setupTests.js | 5 +++++ 11 files changed, 131 insertions(+), 2 deletions(-) create mode 100644 .gitignore create mode 100644 src/App.css create mode 100644 src/App.js create mode 100644 src/App.test.js create mode 100644 src/index.css create mode 100644 src/index.js create mode 100644 src/logo.svg create mode 100644 src/reportWebVitals.js create mode 100644 src/setupTests.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e5c939f --- /dev/null +++ b/.gitignore @@ -0,0 +1,39 @@ +.DS_STORE +node_modules +scripts/flow/*/.flowconfig +.flowconfig +*~ +*.pyc +.grunt +_SpecRunner.html +__benchmarks__ +build/ +remote-repo/ +coverage/ +.module-cache +fixtures/dom/public/react-dom.js +fixtures/dom/public/react.js +test/the-files-to-test.generated.js +*.log* +chrome-user-data +*.sublime-project +*.sublime-workspace +.idea +*.iml +.vscode +*.swp +*.swo + +packages/react-devtools-core/dist +packages/react-devtools-extensions/chrome/build +packages/react-devtools-extensions/chrome/*.crx +packages/react-devtools-extensions/chrome/*.pem +packages/react-devtools-extensions/firefox/build +packages/react-devtools-extensions/firefox/*.xpi +packages/react-devtools-extensions/firefox/*.pem +packages/react-devtools-extensions/shared/build +packages/react-devtools-extensions/.tempUserDataDir +packages/react-devtools-fusebox/dist +packages/react-devtools-inline/dist +packages/react-devtools-shell/dist +packages/react-devtools-timeline/dist \ No newline at end of file diff --git a/src/App.css b/src/App.css new file mode 100644 index 0000000..e69de29 diff --git a/src/App.js b/src/App.js new file mode 100644 index 0000000..20c7c91 --- /dev/null +++ b/src/App.js @@ -0,0 +1,35 @@ +import React from "react"; +import { Route, Routes } from "react-router-dom"; +import Home from "./pages/Home"; +import QRCodeVerification from "./pages/QR"; +import SignUp from "./pages/Signup"; +import Login from "./pages/Login"; +import NotificationSettings from "./pages/Notification"; +import CustomerVoices from "./pages/Contact"; + +const App = () => { + return ( + <> + + }> + } + > + }> + }> + } + > + } + > + }> + + + ); +}; + +export default App; diff --git a/src/App.test.js b/src/App.test.js new file mode 100644 index 0000000..1f03afe --- /dev/null +++ b/src/App.test.js @@ -0,0 +1,8 @@ +import { render, screen } from '@testing-library/react'; +import App from './App'; + +test('renders learn react link', () => { + render(); + const linkElement = screen.getByText(/learn react/i); + expect(linkElement).toBeInTheDocument(); +}); diff --git a/src/index.css b/src/index.css new file mode 100644 index 0000000..42baf5d --- /dev/null +++ b/src/index.css @@ -0,0 +1,10 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +/* Toggle switch styles */ +input:checked ~ .dot { + transform: translateX(100%); + background-color: #4CAF50; + } + \ No newline at end of file diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000..882415c --- /dev/null +++ b/src/index.js @@ -0,0 +1,18 @@ +import React from "react"; +import ReactDOM from "react-dom/client"; +import "./index.css"; +import App from "./App"; +import reportWebVitals from "./reportWebVitals"; +import { BrowserRouter } from "react-router-dom"; + +const root = ReactDOM.createRoot(document.getElementById("root")); +root.render( + + + +); + +// If you want to start measuring performance in your app, pass a function +// to log results (for example: reportWebVitals(console.log)) +// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals +reportWebVitals(); diff --git a/src/logo.svg b/src/logo.svg new file mode 100644 index 0000000..9dfc1c0 --- /dev/null +++ b/src/logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/pages/Login.js b/src/pages/Login.js index b0424b6..3222558 100644 --- a/src/pages/Login.js +++ b/src/pages/Login.js @@ -23,7 +23,7 @@ const Login = () => {
diff --git a/src/pages/Signup.js b/src/pages/Signup.js index c835037..e909acf 100644 --- a/src/pages/Signup.js +++ b/src/pages/Signup.js @@ -39,7 +39,7 @@ const SignUp = () => {
diff --git a/src/reportWebVitals.js b/src/reportWebVitals.js new file mode 100644 index 0000000..5253d3a --- /dev/null +++ b/src/reportWebVitals.js @@ -0,0 +1,13 @@ +const reportWebVitals = onPerfEntry => { + if (onPerfEntry && onPerfEntry instanceof Function) { + import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { + getCLS(onPerfEntry); + getFID(onPerfEntry); + getFCP(onPerfEntry); + getLCP(onPerfEntry); + getTTFB(onPerfEntry); + }); + } +}; + +export default reportWebVitals; diff --git a/src/setupTests.js b/src/setupTests.js new file mode 100644 index 0000000..8f2609b --- /dev/null +++ b/src/setupTests.js @@ -0,0 +1,5 @@ +// jest-dom adds custom jest matchers for asserting on DOM nodes. +// allows you to do things like: +// expect(element).toHaveTextContent(/react/i) +// learn more: https://github.com/testing-library/jest-dom +import '@testing-library/jest-dom';