From b8a628e31cb915e0fba6ea9e82a025a9fa43c631 Mon Sep 17 00:00:00 2001 From: Neven Dyulgerov Date: Mon, 4 Nov 2024 23:44:10 +0200 Subject: [PATCH] fix(apps/staking): Fix types --- apps/staking/src/pages/_app.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/apps/staking/src/pages/_app.tsx b/apps/staking/src/pages/_app.tsx index 5adbcee4..8db87052 100644 --- a/apps/staking/src/pages/_app.tsx +++ b/apps/staking/src/pages/_app.tsx @@ -13,7 +13,7 @@ import { ChakraProvider } from '@chakra-ui/react'; import { theme } from '@explorer/ui'; import { AppProps } from 'next/app'; import dynamic from 'next/dynamic'; -import { useEffect } from 'react'; +import { FC, useEffect, ReactNode } from 'react'; import TagManager from 'react-gtm-module'; import ApolloContainer from '../components/ApolloContainer'; @@ -21,15 +21,20 @@ import { Fonts } from '@explorer/ui'; import { GA4TrackerProvider } from '../contexts/ga4Tracker'; import PageHead from '../components/PageHead'; +type ComponentType = FC<{ children: ReactNode }>; + const FeatureFlagProvider = dynamic(() => import('../utils/featureFlags'), { ssr: false, -}); +}) as ComponentType; const Web3Container = dynamic(() => import('../components/Web3Container'), { ssr: false, -}); +}) as ComponentType; -const App = ({ Component, pageProps }: AppProps) => { +const App = ({ + Component, + pageProps, +}: AppProps & { Component: ComponentType }) => { useEffect(() => { if (process.env.NODE_ENV === 'production') { TagManager.initialize({