diff --git a/src/App.tsx b/src/App.tsx index 9e50dad..c15c25a 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,39 +1,28 @@ import { ChakraProvider } from "@chakra-ui/react"; -import { Route, Routes } from "react-router-dom"; -import Home from "./features/home"; -import LoginPage from "./features/login/login-page"; -import ProfileSetupPage from "./features/registration/profile-setup-page"; -import RegistrationPage from "./features/registration/registration-page"; -import OrgProfilePage from "./features/organisation-profile"; -import OrganisationList from "./features/organisation-list"; -import UserDashboardPage from "./features/user-dashboard/user-dashboard-page"; import { AuthProvider } from "./services/firebase/authProvider"; -import FirestoreMock from "./features/firestore-mock/firestore-mock"; -import { Paths } from "./paths"; -import { appTheme } from "./theme"; +import Routing from "./routing"; +import { Paths } from "./routing/Paths"; +import Header from "./components/Header"; +import Footer from "./components/Footer"; +import mendisphereTheme from "./theme/index"; function App() { + // Get current page + const currentPage = window.location.pathname; + + // Check the current page is not login and registration page + const isShowHeaderAndFooter = ![ + Paths.login, + Paths.signup, + Paths.profileSetup, + ].includes(currentPage); + return ( - + - - } /> - } /> - } /> - } /> - } /> - } - /> - } - /> - {process.env.NODE_ENV === "development" && ( - } /> - )} - + {isShowHeaderAndFooter &&
} + + {isShowHeaderAndFooter &&