mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 16:45:35 +01:00
Added error boundary. Fixed #1976.
This commit is contained in:
parent
d73def80c7
commit
3f1ed750f0
7 changed files with 97 additions and 20 deletions
|
|
@ -3,6 +3,7 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|||
import Head from 'next/head';
|
||||
import Script from 'next/script';
|
||||
import { useRouter } from 'next/router';
|
||||
import ErrorBoundary from 'components/common/ErrorBoundary';
|
||||
import useLocale from 'hooks/useLocale';
|
||||
import useConfig from 'hooks/useConfig';
|
||||
import '@fontsource/inter/400.css';
|
||||
|
|
@ -41,21 +42,37 @@ export default function App({ Component, pageProps }) {
|
|||
textComponent={Wrapper}
|
||||
onError={() => null}
|
||||
>
|
||||
<Head>
|
||||
<link rel="icon" href={`${basePath}/favicon.ico`} />
|
||||
<link rel="apple-touch-icon" sizes="180x180" href={`${basePath}/apple-touch-icon.png`} />
|
||||
<link rel="icon" type="image/png" sizes="32x32" href={`${basePath}/favicon-32x32.png`} />
|
||||
<link rel="icon" type="image/png" sizes="16x16" href={`${basePath}/favicon-16x16.png`} />
|
||||
<link rel="manifest" href={`${basePath}/site.webmanifest`} />
|
||||
<link rel="mask-icon" href={`${basePath}/safari-pinned-tab.svg`} color="#5bbad5" />
|
||||
<meta name="msapplication-TileColor" content="#da532c" />
|
||||
<meta name="theme-color" content="#fafafa" media="(prefers-color-scheme: light)" />
|
||||
<meta name="theme-color" content="#2f2f2f" media="(prefers-color-scheme: dark)" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="robots" content="noindex,nofollow" />
|
||||
</Head>
|
||||
<Component {...pageProps} />
|
||||
{!pathname.includes('/share/') && <Script src={`${basePath}/telemetry.js`} />}
|
||||
<ErrorBoundary>
|
||||
<Head>
|
||||
<link rel="icon" href={`${basePath}/favicon.ico`} />
|
||||
<link
|
||||
rel="apple-touch-icon"
|
||||
sizes="180x180"
|
||||
href={`${basePath}/apple-touch-icon.png`}
|
||||
/>
|
||||
<link
|
||||
rel="icon"
|
||||
type="image/png"
|
||||
sizes="32x32"
|
||||
href={`${basePath}/favicon-32x32.png`}
|
||||
/>
|
||||
<link
|
||||
rel="icon"
|
||||
type="image/png"
|
||||
sizes="16x16"
|
||||
href={`${basePath}/favicon-16x16.png`}
|
||||
/>
|
||||
<link rel="manifest" href={`${basePath}/site.webmanifest`} />
|
||||
<link rel="mask-icon" href={`${basePath}/safari-pinned-tab.svg`} color="#5bbad5" />
|
||||
<meta name="msapplication-TileColor" content="#da532c" />
|
||||
<meta name="theme-color" content="#fafafa" media="(prefers-color-scheme: light)" />
|
||||
<meta name="theme-color" content="#2f2f2f" media="(prefers-color-scheme: dark)" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="robots" content="noindex,nofollow" />
|
||||
</Head>
|
||||
<Component {...pageProps} />
|
||||
{!pathname.includes('/share/') && <Script src={`${basePath}/telemetry.js`} />}
|
||||
</ErrorBoundary>
|
||||
</IntlProvider>
|
||||
</QueryClientProvider>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue