Skip to content

Commit

Permalink
remove unnecessary argument
Browse files Browse the repository at this point in the history
  • Loading branch information
ob6160 committed Oct 7, 2024
1 parent 9a7e521 commit ac79de2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/api-client/withApollo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<NormalizedCacheObject>;
export const getApolloClient: GetApolloClient = () => {
const _apolloClient = apolloClient ?? createApolloClient();

// For SSG and SSR always create a new Apollo Client
Expand All @@ -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<T extends NextPage<any>>(Component: T): T {
Expand Down

0 comments on commit ac79de2

Please sign in to comment.