Projekt

Obecné

Profil

Stáhnout (1.05 KB) Statistiky
| Větev: | Tag: | Revize:
1
// @ts-nocheck
2
import '../styles/globals.scss';
3
import 'bootstrap/dist/css/bootstrap.css';
4
import '@fortawesome/fontawesome-svg-core/styles.css';
5

    
6
import type { AppProps } from 'next/app';
7
import Head from 'next/head';
8
import { SecuredComponent } from '../components/types/Auth';
9
import LoggedUserProvider from '../contexts/LoggedUserContext';
10
import Auth from '../components/common/Auth';
11

    
12
function MyApp({
13
    Component,
14
    pageProps,
15
}: {
16
    Component: SecuredComponent;
17
    pageProps: AppProps['pageProps'];
18
}) {
19
    return (
20
        <LoggedUserProvider>
21
            <Head>
22
                <link rel="shortcut icon" href={'/favicon.ico'} />
23
                <title>Annotation Tool (AV ČR)</title>
24
                <script src="/__ENV.js" defer />
25
            </Head>
26

    
27
            {Component.auth ? (
28
                <Auth minRole={Component.auth?.minRole}>
29
                    <Component {...pageProps} />
30
                </Auth>
31
            ) : (
32
                <Component {...pageProps} />
33
            )}
34
        </LoggedUserProvider>
35
    );
36
}
37

    
38
export default MyApp;
(1-1/3)