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 site: GetSiteResponse;
19 export class App extends Component<AppProps, any> {
20 constructor(props: any, context: any) {
21 super(props, context);
26 <Provider i18next={i18n}>
28 <Theme user={this.props.site.my_user} />
30 this.props.site.site &&
31 this.props.site.site.icon && (
37 href={this.props.site.site.icon}
41 <Navbar site={this.props.site} />
42 <div class="mt-4 p-0 fl-1">
44 {routes.map(({ path, exact, component: C, ...rest }) => (
49 render={props => <C {...props} {...rest} />}
52 <Route render={props => <NoMatch {...props} />} />
56 <Footer site={this.props.site} />