Skip to content

Instantly share code, notes, and snippets.

@antoniomesquita09
Last active March 18, 2021 01:32
Show Gist options
  • Save antoniomesquita09/4c598370ca102191c7e6570289b43ec3 to your computer and use it in GitHub Desktop.
Save antoniomesquita09/4c598370ca102191c7e6570289b43ec3 to your computer and use it in GitHub Desktop.
Routes component to handle fallback page.
import React, { FC } from 'react';
import { Redirect, Switch } from 'react-router-dom';
import { HomePage, LoginPage, NotFoundPage } from 'pages'
const Routes: FC = () => (
<Switch>
<Route path="/" component={HomePage} exact />
<Route path="/login" component={LoginPage} exact />
<Route path="*" component={NotFoundPage} exact />
</Switch>
);
export default Routes;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment