Skip to content

Commit 2c4b59c

Browse files
committed
chore: remove wrong shell wrapping
1 parent e7b1a38 commit 2c4b59c

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

src/pages/404.astro

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,22 @@ import Article from "../layouts/templates/Article.astro";
3131
</section>
3232
</Article>
3333
</div>
34+
</Shell>
3435

35-
<script>
36-
function register() {
37-
const localeElements = document.querySelectorAll("[data-translation]");
38-
const pathname = window.location.pathname;
39-
const activeElement =
40-
Array.from(localeElements).find(
41-
(el) => el instanceof HTMLElement && pathname.startsWith(`/${el.dataset.translation}/`),
42-
) || document.querySelector('[data-translation="de"]');
36+
<script>
37+
function register() {
38+
const localeElements = document.querySelectorAll("[data-translation]");
39+
const pathname = window.location.pathname;
40+
const activeElement =
41+
Array.from(localeElements).find(
42+
(el) => el instanceof HTMLElement && pathname.startsWith(`/${el.dataset.translation}/`),
43+
) || document.querySelector('[data-translation="de"]');
4344

44-
if (activeElement instanceof HTMLElement) {
45-
activeElement.classList.add("active");
46-
}
45+
if (activeElement instanceof HTMLElement) {
46+
activeElement.classList.add("active");
4747
}
48+
}
4849

49-
register();
50-
document.addEventListener("astro:after-swap", register);
51-
</script>
52-
</Shell>
50+
register();
51+
document.addEventListener("astro:after-swap", register);
52+
</script>

0 commit comments

Comments
 (0)