mirror of
https://github.com/myfatemi04/wheelshare-frontend.git
synced 2025-04-09 22:00:16 -04:00
add page for not found
This commit is contained in:
parent
f0c4dd3c40
commit
938be95243
|
@ -9,6 +9,7 @@ import {
|
|||
popLoginContinueURL,
|
||||
setLoginContinueURL,
|
||||
} from './loginContinueUrl';
|
||||
import NotFound from './NotFound';
|
||||
import WheelShare from './WheelShare';
|
||||
import WheelShareLoggedOut from './WheelShareLoggedOut';
|
||||
|
||||
|
@ -54,11 +55,11 @@ export default function App() {
|
|||
>
|
||||
<div style={style}>
|
||||
<Suspense fallback={null}>
|
||||
<BrowserRouter>
|
||||
<Switch>
|
||||
{user ? (
|
||||
<NotificationsProvider>
|
||||
<Header />
|
||||
{user ? (
|
||||
<NotificationsProvider>
|
||||
<Header />
|
||||
<BrowserRouter>
|
||||
<Switch>
|
||||
<Route path="/" exact component={WheelShare} />
|
||||
<Route
|
||||
path="/join/:code"
|
||||
|
@ -67,18 +68,19 @@ export default function App() {
|
|||
<Route path="/carpools/:id" component={CarpoolPage} />
|
||||
<Route path="/events/:id" component={EventPage} />
|
||||
<Route path="/groups/:id" component={GroupPage} />
|
||||
</NotificationsProvider>
|
||||
) : (
|
||||
<>
|
||||
<WheelShareLoggedOut />
|
||||
<Route
|
||||
component={Authenticator}
|
||||
path="/auth/:provider/callback"
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
</Switch>
|
||||
</BrowserRouter>
|
||||
<Route path="/:url" component={NotFound} />
|
||||
</Switch>
|
||||
</BrowserRouter>
|
||||
</NotificationsProvider>
|
||||
) : (
|
||||
<BrowserRouter>
|
||||
<WheelShareLoggedOut />
|
||||
<Route
|
||||
component={Authenticator}
|
||||
path="/auth/:provider/callback"
|
||||
/>
|
||||
</BrowserRouter>
|
||||
)}
|
||||
</Suspense>
|
||||
</div>
|
||||
<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