From ac79de2dac8a60a3fccd54dbb5f82a4d538056d4 Mon Sep 17 00:00:00 2001 From: Oliver Barnwell Date: Sun, 6 Oct 2024 16:58:45 +0100 Subject: [PATCH] remove unnecessary argument --- src/api-client/withApollo.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/api-client/withApollo.tsx b/src/api-client/withApollo.tsx index b68b358f9..b4c98b783 100644 --- a/src/api-client/withApollo.tsx +++ b/src/api-client/withApollo.tsx @@ -55,8 +55,10 @@ function createApolloClient() { }); } -// eslint-disable-next-line @typescript-eslint/no-unused-vars -export function getApolloClient(_context?: unknown) { +type GetApolloClient = ( + ...args: unknown[] +) => ApolloClient; +export const getApolloClient: GetApolloClient = () => { const _apolloClient = apolloClient ?? createApolloClient(); // For SSG and SSR always create a new Apollo Client @@ -66,7 +68,7 @@ export function getApolloClient(_context?: unknown) { if (!apolloClient) apolloClient = _apolloClient; return _apolloClient; -} +}; // eslint-disable-next-line @typescript-eslint/no-explicit-any export function withApollo>(Component: T): T {