Skip to content

Commit

Permalink
useEffect hook missing dep on logged in user
Browse files Browse the repository at this point in the history
  • Loading branch information
eladlachmi committed Apr 8, 2024
1 parent e7ed5d0 commit 848ce50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion webui/src/lib/hooks/storageConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import React, {
} from "react";

import { config } from "../api";
import useUser from "./user";

type StorageConfigContextType = {
error: Error | null;
Expand Down Expand Up @@ -54,6 +55,7 @@ export const useStorageConfig = () => {
export const StorageConfigProvider: FC<{ children: React.ReactNode }> = ({
children,
}) => {
const { user } = useUser();
const [storageConfig, setStorageConfig] = useState<StorageConfigContextType>(
storageConfigInitialState
);
Expand All @@ -67,7 +69,7 @@ export const StorageConfigProvider: FC<{ children: React.ReactNode }> = ({
});
};
fetchStorageConfigAndSetState();
}, []);
}, [user]);

return (
<StorageConfigContext.Provider value={storageConfig}>
Expand Down
2 changes: 1 addition & 1 deletion webui/test/e2e/common/viewParquetObject.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ test.describe("Object Viewer - Parquet File", () => {
const repositoryPage = new RepositoryPage(page);
await repositoryPage.clickObject(PARQUET_OBJECT_NAME);
await expect(page.getByText("Loading...")).not.toBeVisible();
})
});
})

0 comments on commit 848ce50

Please sign in to comment.