From be5ae5a78a8dbbd92e258f9c22f33cc87aa42a33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20H=C3=A5rek=20Andreassen?= Date: Sun, 7 Apr 2024 00:23:18 +0200 Subject: [PATCH] refactor: Clean up types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tim Hårek Andreassen --- components/Search.tsx | 4 ++-- routes/index.tsx | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/components/Search.tsx b/components/Search.tsx index e264d49..da0863a 100644 --- a/components/Search.tsx +++ b/components/Search.tsx @@ -1,4 +1,4 @@ -export default function Search(props: { defaultValue: string }) { +export default function Search(props: { defaultValue: string | null }) { return (
@@ -8,7 +8,7 @@ export default function Search(props: { defaultValue: string }) { className="border-2 rounded-md px-2" name="query" id="query" - defaultValue={props.defaultValue} + defaultValue={props.defaultValue ?? ""} />