Projekt

Obecné

Profil

« Předchozí | Další » 

Revize e97fc3e6

Přidáno uživatelem Lukáš Vlček před asi 2 roky(ů)

Bug fixes

Zobrazit rozdíly:

webapp/constants.ts
11 11
        return e;
12 12
    }
13 13
}
14

  
15
export function getBasePath() {
16
    return env('BASE_PATH') ?? '/law';
17
}
18

  
14 19
export const COLOR_GENERAL = 'gray';
15 20
export const COLOR_SUCCESS = 'darkgreen';
16 21
export const COLOR_WARNING = 'darkorange';
webapp/next.config.js
1
import env from '@beam-australia/react-env';
2

  
3 1
/** @type {import('next').NextConfig} */
4 2
const nextConfig = {
5 3
    reactStrictMode: true,
6
    basePath: env('BASE_PATH') ?? '/law',
7
    assetPrefix: env('BASE_PATH') ?? '/law',
4
    basePath: '/law',
5
    assetPrefix: '/law',
8 6
};
9 7

  
10 8
module.exports = nextConfig;
webapp/pages/_app.tsx
8 8
import { SecuredComponent } from '../components/types/Auth';
9 9
import LoggedUserProvider from '../contexts/LoggedUserContext';
10 10
import Auth from '../components/common/Auth';
11
import { getBasePath } from '../constants';
11 12

  
12 13
function MyApp({
13 14
    Component,
......
19 20
    return (
20 21
        <LoggedUserProvider>
21 22
            <Head>
22
                <link rel="shortcut icon" href={'favicon.ico'} />
23
                <link rel="shortcut icon" href={getBasePath() + '/favicon.ico'} />
23 24
                <title>Annotation Tool (AV ČR)</title>
24
                <script src="__ENV.js" defer />
25
                <script src={getBasePath() + '/__ENV.js'} defer />
25 26
            </Head>
26 27

  
27 28
            {Component.auth ? (

Také k dispozici: Unified diff