Projekt

Obecné

Profil

Stáhnout (960 Bajtů) Statistiky
| Větev: | Tag: | Revize:
1
// @ts-nocheck
2
import '../styles/globals.css';
3
import 'bootstrap/dist/css/bootstrap.css';
4

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

    
11
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
}
34

    
35
export default MyApp;
(1-1/2)