import { withStyles , WithStyles } from "@material-ui/core" ; import * as React from "react" ; import { Route , Switch } from "react-router-dom" ; import { compose , setDisplayName } from "recompose" ; import { Authenticate , Leave , NotFound , Register , RegisterVerification , Reset , ResetVerification } from "routes" ; import { Styles , styles } from "./App.styles" ; /**
 * Render properties
 */ export type RenderProps = WithStyles < Styles > ; param props return export const Render = ( { classes } ) => < div className = { classes . root } > < Switch > < Route exact path = "/" component = { Authenticate } / > < Route exact path = "/leave" component = { Leave } / > < Route exact path = "/register" component = { Register } / > < Route path = "/register/:code+" component = { RegisterVerification } / > < Route exact path = "/reset" component = { Reset } / > < Route path = "/reset/:code+" component = { ResetVerification } / > < Route component = { NotFound } /> < /Switch> < /div>; return export function enhance ( ) { return compose < RenderProps , { } > ( withStyles ( styles ) , setDisplayName ( "App" ) ) ; } /**
 * Application component
 */ export const App = enhance ( ) ( Render ) ;