diff --git a/types/global-ts.d.ts b/global.d.ts similarity index 100% rename from types/global-ts.d.ts rename to global.d.ts diff --git a/lib/modules/portfolio/PortfolioClaim/ClaimNetworkPools/ClaimNetworkPoolsLayout.tsx b/lib/modules/portfolio/PortfolioClaim/ClaimNetworkPools/ClaimNetworkPoolsLayout.tsx index 9bae5112d..bbf03075a 100644 --- a/lib/modules/portfolio/PortfolioClaim/ClaimNetworkPools/ClaimNetworkPoolsLayout.tsx +++ b/lib/modules/portfolio/PortfolioClaim/ClaimNetworkPools/ClaimNetworkPoolsLayout.tsx @@ -1,9 +1,8 @@ import { Card, CardProps, HStack, Heading, IconButton, Stack } from '@chakra-ui/react' import Link from 'next/link' -import { PropsWithChildren } from 'react' import { ArrowLeft } from 'react-feather' -interface Props extends CardProps, PropsWithChildren { +interface Props extends CardProps { backLink: string title: string } diff --git a/lib/shared/services/api/apollo-global-data.provider.tsx b/lib/shared/services/api/apollo-global-data.provider.tsx index ce64eb9b4..93fd8555a 100644 --- a/lib/shared/services/api/apollo-global-data.provider.tsx +++ b/lib/shared/services/api/apollo-global-data.provider.tsx @@ -19,10 +19,11 @@ import { getFxRates } from '../../utils/currencies' import { getPoolCategories } from '@/lib/modules/pool/categories/getPoolCategories' import { PoolCategoriesProvider } from '@/lib/modules/pool/categories/PoolCategoriesProvider' import { mins } from '../../utils/time' +import { PropsWithChildren } from 'react' export const revalidate = 60 -export async function ApolloGlobalDataProvider({ children }: React.PropsWithChildren) { +export async function ApolloGlobalDataProvider({ children }: PropsWithChildren) { const client = getApolloServerClient() const tokensQueryVariables = { diff --git a/test/utils/custom-renderers.tsx b/test/utils/custom-renderers.tsx index d6961c949..ff3fd8f73 100644 --- a/test/utils/custom-renderers.tsx +++ b/test/utils/custom-renderers.tsx @@ -28,16 +28,15 @@ import { apolloTestClient } from './apollo-test-client' import { AppRouterContextProviderMock } from './app-router-context-provider-mock' import { testQueryClient } from './react-query' -export type WrapperProps = { children: ReactNode } -export type Wrapper = ({ children }: WrapperProps) => ReactNode +export type Wrapper = ({ children }: PropsWithChildren) => ReactNode -export const EmptyWrapper = ({ children }: WrapperProps) => <>{children} +export const EmptyWrapper = ({ children }: PropsWithChildren) => <>{children} export function testHook( hook: (props: TProps) => TResult, options?: RenderHookOptions | undefined ) { - function MixedProviders({ children }: WrapperProps) { + function MixedProviders({ children }: PropsWithChildren) { const LocalProviders = options?.wrapper || EmptyWrapper return ( @@ -49,7 +48,7 @@ export function testHook( const result = renderHook(hook, { ...options, - wrapper: MixedProviders, + wrapper: MixedProviders as React.ComponentType<{ children: React.ReactNode }>, }) return { @@ -58,7 +57,7 @@ export function testHook( } } -function GlobalProviders({ children }: WrapperProps) { +function GlobalProviders({ children }: PropsWithChildren) { const defaultRouterOptions = {} return ( diff --git a/tsconfig.json b/tsconfig.json index a68881af4..466ba786b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -24,12 +24,6 @@ }, "types": ["vitest/globals"] }, - "include": [ - "next-env.d.ts", - "**/*.ts", - "**/*.tsx", - ".next/types/**/*.ts", - "types/global-ts.d.ts" - ], + "include": ["global.d.ts", "next-env.d.ts", ".next/types/**/*.ts", "**/*.ts", "**/*.tsx"], "exclude": ["node_modules", ".next"] }