1
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
type UseResolvedAssetReadUrlOptions = {
|
||||
enabled?: boolean;
|
||||
expireSeconds?: number;
|
||||
refreshKey?: string | number | null;
|
||||
};
|
||||
|
||||
export function useResolvedAssetReadUrl(
|
||||
@@ -39,6 +40,7 @@ export function useResolvedAssetReadUrl(
|
||||
|
||||
void resolveAssetReadUrl(normalizedSource, {
|
||||
expireSeconds: options.expireSeconds,
|
||||
refreshKey: options.refreshKey,
|
||||
})
|
||||
.then((nextUrl) => {
|
||||
if (!cancelled) {
|
||||
@@ -55,7 +57,12 @@ export function useResolvedAssetReadUrl(
|
||||
return () => {
|
||||
cancelled = true;
|
||||
};
|
||||
}, [normalizedSource, options.expireSeconds, shouldResolve]);
|
||||
}, [
|
||||
normalizedSource,
|
||||
options.expireSeconds,
|
||||
options.refreshKey,
|
||||
shouldResolve,
|
||||
]);
|
||||
|
||||
return {
|
||||
resolvedUrl,
|
||||
|
||||
Reference in New Issue
Block a user