Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit f1ad572

Browse files
committed
remove unused props
1 parent 19d5eeb commit f1ad572

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

client/web/src/LegacySourcegraphWebApp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ export class LegacySourcegraphWebApp extends React.Component<StaticAppConfig, Le
261261
<SearchResultsCacheProvider />,
262262
<SearchQueryStateStoreProvider useSearchQueryState={useNavbarQueryState} />,
263263
<LegacyRouteContextProvider context={legacyContext} />,
264-
<CodyProApiProvider isSourcegraphDotCom={window.context.sourcegraphDotComMode} />,
264+
<CodyProApiProvider />,
265265
/* eslint-enable react/no-children-prop, react/jsx-key */
266266
]}
267267
>

client/web/src/SourcegraphWebApp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ export const SourcegraphWebApp: FC<SourcegraphWebAppProps> = props => {
284284
...props,
285285
}}
286286
/>,
287-
<CodyProApiProvider isSourcegraphDotCom={props.isSourcegraphDotCom} />,
287+
<CodyProApiProvider />,
288288
/* eslint-enable react/no-children-prop, react/jsx-key */
289289
]}
290290
>

client/web/src/cody/management/api/react-query/CodyProApiProvider.tsx

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,7 @@ const queryClient = new QueryClient({
1818
/**
1919
* CodyProApiProvider wraps its children with the react-query QueryClientProvider.
2020
* It is used to access the Cody Pro API and is only utilized on dotcom.
21-
* In enterprise mode, it simply passes through the children.
2221
*/
23-
export const CodyProApiProvider: React.FC<React.PropsWithChildren<{ isSourcegraphDotCom: boolean }>> = ({
24-
isSourcegraphDotCom,
25-
children,
26-
}) => {
27-
if (!isSourcegraphDotCom) {
28-
return <>{children}</>
29-
}
30-
31-
return <QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
32-
}
22+
export const CodyProApiProvider: React.FC<React.PropsWithChildren<{}>> = ({ children }) => (
23+
<QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
24+
)

0 commit comments

Comments
 (0)