Initial React project
This commit is contained in:
12
src/App.tsx
12
src/App.tsx
@@ -15,6 +15,8 @@ import { JobordbogenPage } from './presentation/jobordbogen/pages/JobordbogenPag
|
||||
import { JobordbogenEntryPage } from './presentation/jobordbogen/pages/JobordbogenEntryPage';
|
||||
import { StoriesPage } from './presentation/stories/pages/StoriesPage';
|
||||
import { NewsletterPage } from './presentation/newsletter/pages/NewsletterPage';
|
||||
import { ForVirksomhederPage } from './presentation/companies/pages/ForVirksomhederPage';
|
||||
import { JobSearchersPage } from './presentation/jobseekers/pages/JobSearchersPage';
|
||||
import {
|
||||
SimulatorPage,
|
||||
type SimulatorEvaluationSelection,
|
||||
@@ -35,6 +37,8 @@ function App() {
|
||||
const isPricingRoute = useMemo(() => window.location.pathname === '/pricing' || window.location.pathname === '/priser', []);
|
||||
const isStoriesRoute = useMemo(() => window.location.pathname === '/stories', []);
|
||||
const isNewsletterRoute = useMemo(() => window.location.pathname === '/newsletter', []);
|
||||
const isCompaniesRoute = useMemo(() => window.location.pathname === '/for-virksomheder' || window.location.pathname === '/virksomheder', []);
|
||||
const isJobseekersRoute = useMemo(() => window.location.pathname === '/for-jobsogere' || window.location.pathname === '/jobsearchers', []);
|
||||
const isJobordbogenEntryRoute = useMemo(() => window.location.pathname.startsWith('/jobordbogen/') && window.location.pathname !== '/jobordbogen/', []);
|
||||
const isJobordbogenRoute = useMemo(() => window.location.pathname === '/jobordbogen' || window.location.pathname === '/academy', []);
|
||||
const initialAuthenticated = useMemo(() => Boolean(window.localStorage.getItem('token')), []);
|
||||
@@ -113,6 +117,14 @@ function App() {
|
||||
return <NewsletterPage />;
|
||||
}
|
||||
|
||||
if (isCompaniesRoute) {
|
||||
return <ForVirksomhederPage />;
|
||||
}
|
||||
|
||||
if (isJobseekersRoute) {
|
||||
return <JobSearchersPage />;
|
||||
}
|
||||
|
||||
if (isJobordbogenEntryRoute) {
|
||||
return <JobordbogenEntryPage />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user