mirror of
https://github.com/myfatemi04/wheelshare-frontend.git
synced 2025-04-17 17:40:16 -04:00
add page for not found
This commit is contained in:
parent
f0c4dd3c40
commit
938be95243
|
@ -9,6 +9,7 @@ import {
|
||||||
popLoginContinueURL,
|
popLoginContinueURL,
|
||||||
setLoginContinueURL,
|
setLoginContinueURL,
|
||||||
} from './loginContinueUrl';
|
} from './loginContinueUrl';
|
||||||
|
import NotFound from './NotFound';
|
||||||
import WheelShare from './WheelShare';
|
import WheelShare from './WheelShare';
|
||||||
import WheelShareLoggedOut from './WheelShareLoggedOut';
|
import WheelShareLoggedOut from './WheelShareLoggedOut';
|
||||||
|
|
||||||
|
@ -54,11 +55,11 @@ export default function App() {
|
||||||
>
|
>
|
||||||
<div style={style}>
|
<div style={style}>
|
||||||
<Suspense fallback={null}>
|
<Suspense fallback={null}>
|
||||||
<BrowserRouter>
|
{user ? (
|
||||||
<Switch>
|
<NotificationsProvider>
|
||||||
{user ? (
|
<Header />
|
||||||
<NotificationsProvider>
|
<BrowserRouter>
|
||||||
<Header />
|
<Switch>
|
||||||
<Route path="/" exact component={WheelShare} />
|
<Route path="/" exact component={WheelShare} />
|
||||||
<Route
|
<Route
|
||||||
path="/join/:code"
|
path="/join/:code"
|
||||||
|
@ -67,18 +68,19 @@ export default function App() {
|
||||||
<Route path="/carpools/:id" component={CarpoolPage} />
|
<Route path="/carpools/:id" component={CarpoolPage} />
|
||||||
<Route path="/events/:id" component={EventPage} />
|
<Route path="/events/:id" component={EventPage} />
|
||||||
<Route path="/groups/:id" component={GroupPage} />
|
<Route path="/groups/:id" component={GroupPage} />
|
||||||
</NotificationsProvider>
|
<Route path="/:url" component={NotFound} />
|
||||||
) : (
|
</Switch>
|
||||||
<>
|
</BrowserRouter>
|
||||||
<WheelShareLoggedOut />
|
</NotificationsProvider>
|
||||||
<Route
|
) : (
|
||||||
component={Authenticator}
|
<BrowserRouter>
|
||||||
path="/auth/:provider/callback"
|
<WheelShareLoggedOut />
|
||||||
/>
|
<Route
|
||||||
</>
|
component={Authenticator}
|
||||||
)}
|
path="/auth/:provider/callback"
|
||||||
</Switch>
|
/>
|
||||||
</BrowserRouter>
|
</BrowserRouter>
|
||||||
|
)}
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</div>
|
</div>
|
||||||
<Footer />
|
<Footer />
|
||||||
|
|
8
src/components/NotFound.tsx
Normal file
8
src/components/NotFound.tsx
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
export default function NotFound() {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<h1>Not Found</h1>
|
||||||
|
<p>The page you're looking for does not exist.</p>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user