From feb88afb8c784e0db65be96073a1b0064e36128c Mon Sep 17 00:00:00 2001
From: Julius Marminge <julius0216@outlook.com>
Date: Mon, 29 Aug 2022 18:00:08 +0200
Subject: fix: improve docs example (#4355)

* fix: improve docs example

* final touches

* chore: prettier

* lockfile

* ci?

* downgrade types node

* fresh lockfile

* lockfile and npmrc

* remove debug log

* Merge branch 'main' into docs-template-ts

* merging lockfiles suck

* update lockfile

* satisfy linter
---
 examples/docs/src/components/Header/SidebarToggle.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'examples/docs/src/components/Header/SidebarToggle.tsx')

diff --git a/examples/docs/src/components/Header/SidebarToggle.tsx b/examples/docs/src/components/Header/SidebarToggle.tsx
index 2be9dee9a..50a5d93d0 100644
--- a/examples/docs/src/components/Header/SidebarToggle.tsx
+++ b/examples/docs/src/components/Header/SidebarToggle.tsx
@@ -1,12 +1,12 @@
+/** @jsxImportSource preact */
 import type { FunctionalComponent } from 'preact';
-import { h, Fragment } from 'preact';
 import { useState, useEffect } from 'preact/hooks';
 
 const MenuToggle: FunctionalComponent = () => {
 	const [sidebarShown, setSidebarShown] = useState(false);
 
 	useEffect(() => {
-		const body = document.getElementsByTagName('body')[0];
+		const body = document.querySelector('body')!;
 		if (sidebarShown) {
 			body.classList.add('mobile-sidebar-toggle');
 		} else {
-- 
cgit v1.2.3

