fixes issues in firefox where view transitions are not available (#139)

This commit is contained in:
dswbx
2025-04-04 09:00:50 +02:00
committed by GitHub
parent a12d4e13d0
commit de984fa101

View File

@@ -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();
}
});
}