From 875635f2d97578229bcb656827ffc97a689d1959 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Sun, 18 Jun 2023 01:33:40 -0700 Subject: [PATCH] Fix type error --- components/FilterModal/index.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/components/FilterModal/index.tsx b/components/FilterModal/index.tsx index ed41db21..23b65409 100644 --- a/components/FilterModal/index.tsx +++ b/components/FilterModal/index.tsx @@ -199,15 +199,17 @@ const FilterModal = (props: Props) => { setMinWeaponCount(value) } - function handleMaxButtonsCountValueChange(value: number) { - setMaxButtonsCount(value) + function handleMaxButtonsCountValueChange(value?: string) { + if (!value) return + setMaxButtonsCount(parseInt(value)) } - function handleMaxTurnsCountValueChange(value: number) { - setMaxTurnsCount(value) + function handleMaxTurnsCountValueChange(value?: string) { + if (!value) return + setMaxTurnsCount(parseInt(value)) } - function handleNameQualityValueChange(value: boolean) { + function handleNameQualityValueChange(value?: boolean) { setNameQuality(value) }