Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/src/app/components/OidcProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const AuthEnabledOidcProvider: React.FC<IOidcProviderProps> = ({
url_state: window.location.pathname + window.location.search,
});
}
}, [auth.isAuthenticated, auth.isLoading, auth.error, auth.signinRedirect]);
}, [auth]);

if (auth.isAuthenticated) {
return <Suspense fallback={<AppPlaceholder />}>{children}</Suspense>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ export const useActiveItemEffects = <TItem>({
if (!isLoading && activeItemId && !activeItem) {
clearActiveItem();
}
}, [isLoading, activeItemId, activeItem]); // TODO fix the exhaustive-deps lint warning here without affecting behavior
}, [isLoading, activeItemId, activeItem, clearActiveItem]);
};
3 changes: 2 additions & 1 deletion client/src/app/hooks/useUrlParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,11 @@ export const useUrlParams = <
params = allParamsEmpty ? defaultValue : deserialize(serializedParams);
}

/* eslint-disable @eslint-react/exhaustive-deps -- setParams and defaultValue are stable per-mount; including them causes render loops */
React.useEffect(() => {
if (allParamsEmpty) setParams(defaultValue);
// Leaving this rule enabled results in a cascade of unnecessary useCallbacks:
}, [allParamsEmpty]);
/* eslint-enable @eslint-react/exhaustive-deps */

return [params, setParams];
};
Expand Down
1 change: 0 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export default defineConfig([
"@eslint-react/no-unnecessary-use-prefix": "off",
"@typescript-eslint/no-unused-vars": "off",
"@eslint-react/static-components": "off",
"@eslint-react/exhaustive-deps": "off",
"@eslint-react/no-nested-component-definitions": "off",
"@tanstack/query/prefer-query-options": "off",
"@tanstack/query/exhaustive-deps": "off",
Expand Down