add page for not found

This commit is contained in:
Michael Fatemi 2021-08-11 21:02:35 -04:00
parent f0c4dd3c40
commit 938be95243
2 changed files with 27 additions and 17 deletions

View File

@ -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 />

View 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>
);
}