Skip to content

Commit

Permalink
Merge pull request #100 from amit429/master
Browse files Browse the repository at this point in the history
issue#99 Build fail along with bad coding errors
  • Loading branch information
Trisha-tech authored May 15, 2024
2 parents 46cceaa + 92524cc commit e37f1de
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 60 deletions.
29 changes: 26 additions & 3 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 5 additions & 14 deletions client/src/App.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,21 @@


import {HomePage} from "./Components/index";
import logo from "./logo.svg";
import "./App.css";
import { BrowserRouter, Route, Routes, Outlet} from "react-router-dom";
import { Header } from './components';
import LoginPage from "./Components/LoginPage";
import SignUpPage from "./Components/SignUpPage";
import { Header } from './Components';
import Product from "./Components/Product";

function App() {
return (
<BrowserRouter>
<Header />
<>
<Header />
<Routes>
<Route index element={<LoginPage />} />
<Route path="/signup" element={<SignUpPage />} />{" "}
{/* Adjusted route path */}
<Route path="/login" element={<LoginPage />} />{" "}
{/* Adjusted route path */}
<Route path="/product" element={<Product/>}/>
<Route index element={<HomePage />} /> {/* Route for the Home page */}
<Route path="/signup" element={<SignUpPage />} />
<Route path="/login" element={<LoginPage />} />
</Routes>
<Outlet />
</BrowserRouter>
</>
);
}

Expand Down
8 changes: 5 additions & 3 deletions client/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
import { RouterProvider, createBrowserRouter } from "react-router-dom"
import { HomePage, ProfilePage} from "./components/index"
import { HomePage, ProfilePage} from "./Components/index"

const router = createBrowserRouter([
{
Expand All @@ -26,8 +26,10 @@ const router = createBrowserRouter([
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>
<RouterProvider router={router}/>
</React.StrictMode>
<RouterProvider router={router}>
<App />
</RouterProvider>
</React.StrictMode>,
);

// If you want to start measuring performance in your app, pass a function
Expand Down
85 changes: 45 additions & 40 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@heroicons/react": "^2.1.3",
"bcryptjs": "^2.4.3",
"body-parser": "^1.20.2",
"cookie-parser": "^1.4.6",
Expand Down

0 comments on commit e37f1de

Please sign in to comment.