fileStorage/hooks: fix deps on useFileStoragePath

This way, if uuid changes, we get the correct result.
This commit is contained in:
David Lechner
2022-12-16 17:54:36 -06:00
committed by David Lechner
parent b38c302d7a
commit 78b962d397
+1 -1
View File
@@ -23,7 +23,7 @@ export function useFileStorageMetadata(): FileMetadata[] | undefined {
*/
export function useFileStoragePath(uuid: UUID): string | undefined {
const db = useContext(FileStorageContext);
return useLiveQuery(() => db.metadata.get(uuid, (x) => x?.path));
return useLiveQuery(() => db.metadata.get(uuid, (x) => x?.path), [uuid]);
}
/**