Skip to content

Commit

Permalink
Remove unnecessary key prop
Browse files Browse the repository at this point in the history
  • Loading branch information
ghengeveld committed Jul 19, 2024
1 parent b706651 commit d094e1f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
4 changes: 1 addition & 3 deletions src/Panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
IS_OFFLINE,
IS_OUTDATED,
LOCAL_BUILD_PROGRESS,
PANEL_ID,
REMOVE_ADDON,
TELEMETRY,
} from "./constants";
Expand Down Expand Up @@ -96,7 +95,7 @@ export const Panel = ({ active, api }: PanelProps) => {

const fetch = useChannelFetch();
const withProviders = (children: React.ReactNode) => (
<GraphQLClientProvider key={PANEL_ID} value={createClient({ fetch })}>
<GraphQLClientProvider value={createClient({ fetch })}>
<TelemetryProvider value={trackEvent}>
<AuthProvider value={{ accessToken, setAccessToken }}>
<UninstallProvider
Expand Down Expand Up @@ -136,7 +135,6 @@ export const Panel = ({ active, api }: PanelProps) => {
if (!accessToken) {
return withProviders(
<Authentication
key={PANEL_ID}
setAccessToken={setAccessToken}
setCreatedProjectId={setCreatedProjectId}
hasProjectId={!!projectId}
Expand Down
9 changes: 1 addition & 8 deletions src/utils/graphQLClient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,7 @@ export const createClient = (options?: Partial<ClientOptions>) =>
export const GraphQLClientProvider = ({
children,
value = createClient(),
...rest
}: {
children: React.ReactNode;
value?: Client;
}) => {
return (
<Provider value={value} {...rest}>
{children}
</Provider>
);
};
}) => <Provider value={value}>{children}</Provider>;

0 comments on commit d094e1f

Please sign in to comment.