mirror of
https://github.com/mgerb/react-starter
synced 2026-01-10 09:02:49 +00:00
upgrade to webpack 4 - complete overhaul
This commit is contained in:
32
app/routes.tsx
Normal file
32
app/routes.tsx
Normal file
@@ -0,0 +1,32 @@
|
||||
import React from 'react';
|
||||
import { BrowserRouter, Route, Switch } from 'react-router-dom';
|
||||
|
||||
import { NavBar } from './components';
|
||||
import { Home, NotFound } from './pages';
|
||||
|
||||
// styling
|
||||
import './scss/index.scss';
|
||||
|
||||
interface Props {}
|
||||
|
||||
interface State {}
|
||||
|
||||
export class Routes extends React.Component<Props, State> {
|
||||
constructor(props: Props) {
|
||||
super(props);
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
return (
|
||||
<BrowserRouter>
|
||||
<div>
|
||||
<NavBar />
|
||||
<Switch>
|
||||
<Route exact path="/" component={Home} />
|
||||
<Route component={NotFound} />
|
||||
</Switch>
|
||||
</div>
|
||||
</BrowserRouter>
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user