From adad73c48fdadce88444bb645a375c5f5d660a39 Mon Sep 17 00:00:00 2001 From: MathewFrancis Date: Wed, 28 May 2025 16:32:50 +0530 Subject: [PATCH] Router for both login and sigup also home page redirect :) --- MySQL_conf_pbx/test1/reactcezenpbx/src/App.jsx | 12 +++++++++++- .../src/components/login-logout/form_styling.css | 2 +- .../src/components/login-logout/signInup.jsx | 7 +++++-- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/MySQL_conf_pbx/test1/reactcezenpbx/src/App.jsx b/MySQL_conf_pbx/test1/reactcezenpbx/src/App.jsx index bdf121d..8f7132e 100755 --- a/MySQL_conf_pbx/test1/reactcezenpbx/src/App.jsx +++ b/MySQL_conf_pbx/test1/reactcezenpbx/src/App.jsx @@ -3,6 +3,9 @@ import reactLogo from "./assets/react.svg"; import viteLogo from "/vite.svg"; import SignInUp from "./components/login-logout/signInup"; import LandingPage from "./components/landing-page/homePage.jsx"; +import SignUp from "./components/login-logout/signUp.jsx"; +import LogIn from "./components/login-logout/logIn.jsx"; + import "./App.css"; // routing @@ -10,7 +13,14 @@ import { createBrowserRouter, RouterProvider } from "react-router-dom"; const router = createBrowserRouter([ { path: "/", element: }, - { path: "/open", element: }, + { + path: "/", + element: , + children: [ + { path: "sign-up", element: }, + { path: "log-in", element: }, + ], + }, ]); function App() { diff --git a/MySQL_conf_pbx/test1/reactcezenpbx/src/components/login-logout/form_styling.css b/MySQL_conf_pbx/test1/reactcezenpbx/src/components/login-logout/form_styling.css index 3dfc8ae..a6c8e62 100755 --- a/MySQL_conf_pbx/test1/reactcezenpbx/src/components/login-logout/form_styling.css +++ b/MySQL_conf_pbx/test1/reactcezenpbx/src/components/login-logout/form_styling.css @@ -2,7 +2,7 @@ section { display: flex; flex-direction: row; font-size: 2rem; - margin-bottom: 4rem; + margin-bottom: 15rem; } .intro-page { diff --git a/MySQL_conf_pbx/test1/reactcezenpbx/src/components/login-logout/signInup.jsx b/MySQL_conf_pbx/test1/reactcezenpbx/src/components/login-logout/signInup.jsx index 8367036..bc16edb 100755 --- a/MySQL_conf_pbx/test1/reactcezenpbx/src/components/login-logout/signInup.jsx +++ b/MySQL_conf_pbx/test1/reactcezenpbx/src/components/login-logout/signInup.jsx @@ -4,6 +4,8 @@ import LogIn from "./logIn"; import "./form_styling.css"; import "./logo_and_text.css"; // admin signup +// outlet is here displays the child routs +import { Outlet } from "react-router-dom"; export default function SignInUp() { // user signup @@ -15,8 +17,9 @@ export default function SignInUp() {
- - + {/* + */} +

Description