mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-17 12:56:05 +00:00
fixes issues in firefox where view transitions are not available (#139)
This commit is contained in:
@@ -101,14 +101,21 @@ export function BkndProvider({
|
|||||||
fallback: true,
|
fallback: true,
|
||||||
} as any);
|
} as any);
|
||||||
|
|
||||||
|
|
||||||
startTransition(() => {
|
startTransition(() => {
|
||||||
document.startViewTransition(() => {
|
const commit = () => {
|
||||||
setSchema(newSchema);
|
setSchema(newSchema);
|
||||||
setWithSecrets(_includeSecrets);
|
setWithSecrets(_includeSecrets);
|
||||||
setFetched(true);
|
setFetched(true);
|
||||||
set_local_version((v) => v + 1);
|
set_local_version((v) => v + 1);
|
||||||
fetching.current = Fetching.None;
|
fetching.current = Fetching.None;
|
||||||
});
|
}
|
||||||
|
|
||||||
|
if ("startViewTransition" in document) {
|
||||||
|
document.startViewTransition(commit);
|
||||||
|
} else {
|
||||||
|
commit();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user