Use history.replaceState ageVerified query and remove ENABLE_VIEW_TRANSITIONS

This commit is contained in:
Bad Manners 2024-08-26 14:49:12 -03:00
parent 92123a305d
commit f57ba9ddc4
19 changed files with 91 additions and 74 deletions

View file

@ -55,7 +55,6 @@ import { IconTriangleExclamation } from "./icons";
<AgeRestrictedScriptInline />
<script>
import { ENABLE_VIEW_TRANSITIONS } from "astro:env/client";
type AgeVerified = "true" | undefined;
const ageRestrictedModalSetup = () => {
@ -99,9 +98,6 @@ import { IconTriangleExclamation } from "./icons";
rejectButton.focus();
}
};
if (ENABLE_VIEW_TRANSITIONS) {
document.addEventListener("astro:page-load", ageRestrictedModalSetup);
} else {
ageRestrictedModalSetup();
}
ageRestrictedModalSetup();
</script>