Projekt

Obecné

Profil

Stáhnout (960 Bajtů) Statistiky
| Větev: | Tag: | Revize:
1 8c45ccb0 hrubyjar
// @ts-nocheck
2
import '../styles/globals.css';
3
import 'bootstrap/dist/css/bootstrap.css';
4 56cc66d8 Lukáš Vlček
5 8c45ccb0 hrubyjar
import type { AppProps } from 'next/app';
6
import Head from 'next/head';
7 7a32656e Jaroslav Hrubý
import { SecuredComponent } from '../components/types/Auth';
8 8c45ccb0 hrubyjar
import LoggedUserProvider from '../contexts/LoggedUserContext';
9
import Auth from '../components/common/Auth';
10 56cc66d8 Lukáš Vlček
11 8c45ccb0 hrubyjar
function MyApp({
12
    Component,
13
    pageProps,
14
}: {
15
    Component: SecuredComponent;
16
    pageProps: AppProps['pageProps'];
17
}) {
18
    return (
19
        <LoggedUserProvider>
20
            <Head>
21
                <link rel="shortcut icon" href={'/favicon.ico'} />
22
                <title>Annotation Tool</title>
23
            </Head>
24
            {Component.auth ? (
25
                <Auth minRole={Component.auth?.minRole}>
26
                    <Component {...pageProps} />
27
                </Auth>
28
            ) : (
29
                <Component {...pageProps} />
30
            )}
31
        </LoggedUserProvider>
32
    );
33 56cc66d8 Lukáš Vlček
}
34
35 8c45ccb0 hrubyjar
export default MyApp;