mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +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,
|
||||
} as any);
|
||||
|
||||
|
||||
startTransition(() => {
|
||||
document.startViewTransition(() => {
|
||||
const commit = () => {
|
||||
setSchema(newSchema);
|
||||
setWithSecrets(_includeSecrets);
|
||||
setFetched(true);
|
||||
set_local_version((v) => v + 1);
|
||||
fetching.current = Fetching.None;
|
||||
});
|
||||
}
|
||||
|
||||
if ("startViewTransition" in document) {
|
||||
document.startViewTransition(commit);
|
||||
} else {
|
||||
commit();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user