1 import { Component } from 'inferno';
2 import { Route, Switch } from 'inferno-router';
3 import { Provider } from 'inferno-i18next';
4 import { Helmet } from 'inferno-helmet';
5 import { i18n } from '../i18next';
6 import { routes } from '../routes';
7 import { Navbar } from './navbar';
8 import { Footer } from './footer';
9 import { NoMatch } from './no-match';
10 import { Theme } from './theme';
11 import { Symbols } from './symbols';
12 import { GetSiteResponse } from 'lemmy-js-client';
13 import './styles.scss';
15 export interface AppProps {
16 siteRes: GetSiteResponse;
19 export class App extends Component<AppProps, any> {
20 constructor(props: any, context: any) {
21 super(props, context);
24 let siteRes = this.props.siteRes;
27 <Provider i18next={i18n}>
29 <Theme user={siteRes.my_user} />
32 this.props.siteRes.site_view.site.icon && (
38 href={this.props.siteRes.site_view.site.icon}
42 <Navbar site_res={this.props.siteRes} />
43 <div class="mt-4 p-0 fl-1">
45 {routes.map(({ path, exact, component: C, ...rest }) => (
50 render={props => <C {...props} {...rest} />}
53 <Route render={props => <NoMatch {...props} />} />
57 <Footer site={this.props.siteRes} />