mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-19 03:29:37 +02:00
47 lines
No EOL
1.3 KiB
TypeScript
47 lines
No EOL
1.3 KiB
TypeScript
import { NavLink, Link, Switch, Route, withRouter, match } from 'react-router-dom';
|
|
|
|
import classes from './Settings.module.css';
|
|
|
|
import { Container } from '../UI/Layout/Layout';
|
|
import Headline from '../UI/Headlines/Headline/Headline';
|
|
import Themer from '../Themer/Themer';
|
|
|
|
interface ComponentProps {
|
|
match: match;
|
|
}
|
|
|
|
const Settings = (props: ComponentProps): JSX.Element => {
|
|
return (
|
|
<Container>
|
|
<Headline
|
|
title='Settings'
|
|
subtitle={<Link to='/'>Go back</Link>}
|
|
/>
|
|
<div className={classes.Settings}>
|
|
<nav className={classes.SettingsNav}>
|
|
<NavLink
|
|
className={classes.SettingsNavLink}
|
|
activeClassName={classes.SettingsNavLinkActive}
|
|
exact
|
|
to='/settings'>
|
|
Theme
|
|
</NavLink>
|
|
<NavLink
|
|
className={classes.SettingsNavLink}
|
|
activeClassName={classes.SettingsNavLinkActive}
|
|
exact
|
|
to='/settings/nothig'>
|
|
Weather
|
|
</NavLink>
|
|
</nav>
|
|
<section className={classes.SettingsContent}>
|
|
<Switch>
|
|
<Route exact path='/settings' component={Themer} />
|
|
</Switch>
|
|
</section>
|
|
</div>
|
|
</Container>
|
|
)
|
|
}
|
|
|
|
export default withRouter(Settings); |