All files / src app.tsx

0% Statements 0/12
100% Branches 0/0
0% Functions 0/1
0% Lines 0/12

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62                                                                                                                           
import React from "react";
import { Provider } from "react-redux";
import { BrowserRouter, Switch, Route } from "react-router-dom";
 
import store from "./store";
 
import HomePage from "./pages/home-page";
import ProfilePage from "./pages/profile-page";
import NotFoundPage from "./pages/not-found-page";
 
import WrapperFor404RedirectsFromGitHubPages from "./components/wrapper-for-404-redirects-from-github-pages";
 
import { createStyleFor } from "./helpers/styles";
 
/** @private */
const styleFor = createStyleFor({
	footer: {
		cursor: "pointer",
		width: "90%",
		margin: "0 5%",
		animation: "slide-up-from-bottom 2s 8s both"
	},
});
 
export default function App(): JSX.Element {
	return (
		<Provider store={store}>
			<BrowserRouter>
				<Switch>
					<Route exact path="/">
						<WrapperFor404RedirectsFromGitHubPages>
							<HomePage />
						</WrapperFor404RedirectsFromGitHubPages>
					</Route>
					<Route exact path="/profile">
						<ProfilePage />
					</Route>
					<Route path="*">
						<NotFoundPage />
					</Route>
				</Switch>
			</BrowserRouter>
 
			<footer
				className="bg-primary rounded-top"
				style={styleFor.footer}
			>
				<a
					className="d-block"
					href="https://github.com/parzh/parzh.github.io"
					target="_blank"
					rel="noopener noreferrer"
				>
					<button className="bg-transparent border-0 w-100 p-0 text-white py-4 lead">
						Visit the code repository of this site
					</button>
				</a>
			</footer>
		</Provider>
	);
}