From 27bb3832683275be0c778a38c526bfd55cebee59 Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 22 Aug 2024 22:43:23 +0100 Subject: Submit fix (#4978) * Fix submit logic * Fix type * Align submit task creation 1:1 with callsites * blegh. `useThrottledValue` * make `useThrottledValue`'s time required --------- Co-authored-by: Hailey --- src/components/hooks/useThrottledValue.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/components/hooks/useThrottledValue.ts') diff --git a/src/components/hooks/useThrottledValue.ts b/src/components/hooks/useThrottledValue.ts index 5764c547e..29a11b935 100644 --- a/src/components/hooks/useThrottledValue.ts +++ b/src/components/hooks/useThrottledValue.ts @@ -2,7 +2,7 @@ import {useEffect, useRef, useState} from 'react' import {useNonReactiveCallback} from '#/lib/hooks/useNonReactiveCallback' -export function useThrottledValue(value: T, time?: number) { +export function useThrottledValue(value: T, time: number) { const pendingValueRef = useRef(value) const [throttledValue, setThrottledValue] = useState(value) -- cgit 1.4.1