mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-06-01 11:38:26 +01:00
fix(hooks): correct useMemo dependency arrays
Two memos read values missing from their dependency arrays: - TrackSheet: the MediaStreams filter uses streamType (add it). - LibraryItemCard: the route memo uses api (add it). Prevents stale memoized values when those inputs change (e.g. api after re-login).
This commit is contained in:
@@ -51,7 +51,7 @@ export const LibraryItemCard: React.FC<Props> = ({ library, ...props }) => {
|
||||
api,
|
||||
item: library,
|
||||
}),
|
||||
[library],
|
||||
[api, library],
|
||||
);
|
||||
|
||||
const itemType = useMemo(() => {
|
||||
|
||||
Reference in New Issue
Block a user