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 <me@haileyok.com>
This commit is contained in:
parent
df5bf28e61
commit
27bb383268
5 changed files with 46 additions and 32 deletions
|
@ -2,7 +2,7 @@ import {useEffect, useRef, useState} from 'react'
|
|||
|
||||
import {useNonReactiveCallback} from '#/lib/hooks/useNonReactiveCallback'
|
||||
|
||||
export function useThrottledValue<T>(value: T, time?: number) {
|
||||
export function useThrottledValue<T>(value: T, time: number) {
|
||||
const pendingValueRef = useRef(value)
|
||||
const [throttledValue, setThrottledValue] = useState(value)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue