Use path aliasing
This commit is contained in:
parent
b9155828af
commit
f23b3774d4
15 changed files with 715 additions and 445 deletions
|
|
@ -4,11 +4,11 @@ import { IconTriangleExclamation } from "./icons";
|
|||
---
|
||||
|
||||
<div
|
||||
style={{ display: "none" }}
|
||||
id="modal-age-restricted"
|
||||
class="fixed inset-0 bg-stone-50 dark:bg-zinc-900"
|
||||
role="dialog"
|
||||
aria-labelledby="title-age-restricted"
|
||||
hidden
|
||||
>
|
||||
<div class="mx-auto flex min-h-screen max-w-3xl flex-col items-center justify-center text-center tracking-tight">
|
||||
<div class="text-bm-500 dark:text-bm-400">
|
||||
|
|
@ -30,9 +30,9 @@ import { IconTriangleExclamation } from "./icons";
|
|||
screen from appearing in the future.
|
||||
</p>
|
||||
<div
|
||||
style={{ display: "none" }}
|
||||
id="age-verification-button-list"
|
||||
class="flex w-full max-w-md flex-col-reverse justify-evenly gap-y-5 px-6 pt-5 font-medium sm:max-w-2xl sm:flex-row"
|
||||
hidden
|
||||
>
|
||||
<button
|
||||
data-modal-reject
|
||||
|
|
@ -87,14 +87,12 @@ import { IconTriangleExclamation } from "./icons";
|
|||
localStorage.ageVerified = "true";
|
||||
document.body.style.overflow = "auto";
|
||||
document.querySelectorAll("body>:not(#modal-age-restricted)").forEach((el) => el.removeAttribute("inert"));
|
||||
modal.style.display = "none";
|
||||
modal.hidden = true;
|
||||
addAgeVerifiedQueryToLinks();
|
||||
},
|
||||
{ once: true },
|
||||
);
|
||||
modal
|
||||
.querySelector<HTMLElementTagNameMap["div"]>("div#age-verification-button-list")!
|
||||
.style.removeProperty("display");
|
||||
modal.querySelector<HTMLElementTagNameMap["div"]>("div#age-verification-button-list")!.hidden = false;
|
||||
rejectButton.focus();
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue