Fix some Typescript errors when using latest Next
Ran into these when building for deploy!
This commit is contained in:
parent
3b6bc0b6eb
commit
0b9cec9c44
2 changed files with 11 additions and 10 deletions
|
@ -19,7 +19,7 @@ export type NextPageWithLayout<P = {}, IP = P> = NextPage<P, IP> & {
|
||||||
|
|
||||||
const theme = extendTheme({
|
const theme = extendTheme({
|
||||||
styles: {
|
styles: {
|
||||||
global: (props) => ({
|
global: (props: any) => ({
|
||||||
html: {
|
html: {
|
||||||
// HACK: Chakra sets body as the relative position element, which is
|
// HACK: Chakra sets body as the relative position element, which is
|
||||||
// fine, except its `min-height: 100%` doesn't actually work
|
// fine, except its `min-height: 100%` doesn't actually work
|
||||||
|
@ -35,7 +35,10 @@ const theme = extendTheme({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
type AppPropsWithLayout = AppProps & { Component: NextPageWithLayout };
|
type AppPropsWithLayout = AppProps & {
|
||||||
|
Component: NextPageWithLayout;
|
||||||
|
pageProps: any;
|
||||||
|
};
|
||||||
|
|
||||||
export default function DTIApp({ Component, pageProps }: AppPropsWithLayout) {
|
export default function DTIApp({ Component, pageProps }: AppPropsWithLayout) {
|
||||||
const renderWithLayout =
|
const renderWithLayout =
|
||||||
|
@ -92,9 +95,8 @@ function DTIApolloProvider({
|
||||||
|
|
||||||
// Save the first `additionalCacheState` we get as our `initialCacheState`,
|
// Save the first `additionalCacheState` we get as our `initialCacheState`,
|
||||||
// which we'll use to initialize the client without having to wait a tick.
|
// which we'll use to initialize the client without having to wait a tick.
|
||||||
const [initialCacheState, unusedSetInitialCacheState] = React.useState(
|
const [initialCacheState, unusedSetInitialCacheState] =
|
||||||
additionalCacheState
|
React.useState(additionalCacheState);
|
||||||
);
|
|
||||||
|
|
||||||
const client = React.useMemo(
|
const client = React.useMemo(
|
||||||
() =>
|
() =>
|
||||||
|
@ -102,7 +104,7 @@ function DTIApolloProvider({
|
||||||
getAuth0: () => auth0Ref.current,
|
getAuth0: () => auth0Ref.current,
|
||||||
initialCacheState,
|
initialCacheState,
|
||||||
}),
|
}),
|
||||||
[initialCacheState]
|
[initialCacheState],
|
||||||
);
|
);
|
||||||
|
|
||||||
// When we get a new `additionalCacheState` object, merge it into the cache:
|
// When we get a new `additionalCacheState` object, merge it into the cache:
|
||||||
|
@ -135,7 +137,7 @@ function DTIApolloProvider({
|
||||||
console.debug(
|
console.debug(
|
||||||
"Merging Apollo cache:",
|
"Merging Apollo cache:",
|
||||||
additionalCacheState,
|
additionalCacheState,
|
||||||
mergedCacheState
|
mergedCacheState,
|
||||||
);
|
);
|
||||||
client.cache.restore(mergedCacheState);
|
client.cache.restore(mergedCacheState);
|
||||||
}, [client, additionalCacheState]);
|
}, [client, additionalCacheState]);
|
||||||
|
@ -145,8 +147,7 @@ function DTIApolloProvider({
|
||||||
|
|
||||||
function setupLogging() {
|
function setupLogging() {
|
||||||
Sentry.init({
|
Sentry.init({
|
||||||
dsn:
|
dsn: "https://c55875c3b0904264a1a99e5b741a221e@o506079.ingest.sentry.io/5595379",
|
||||||
"https://c55875c3b0904264a1a99e5b741a221e@o506079.ingest.sentry.io/5595379",
|
|
||||||
autoSessionTracking: true,
|
autoSessionTracking: true,
|
||||||
integrations: [
|
integrations: [
|
||||||
new Integrations.BrowserTracing({
|
new Integrations.BrowserTracing({
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"lib": ["dom", "dom.iterable", "esnext"],
|
"lib": ["dom", "dom.iterable", "es2021"],
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"allowSyntheticDefaultImports": true,
|
"allowSyntheticDefaultImports": true,
|
||||||
"noFallthroughCasesInSwitch": true,
|
"noFallthroughCasesInSwitch": true,
|
||||||
|
|
Loading…
Reference in a new issue