feat(app): url persistence

This commit is contained in:
rektdeckard
2024-01-04 19:39:05 -07:00
committed by Tobias Fried
parent 6db9a08f7f
commit b9e41ac135
7 changed files with 86 additions and 58 deletions

View File

@@ -52,7 +52,7 @@ const SearchInput = (_: SearchInputProps) => {
}, [query]);
/* eslint-enable react-hooks/exhaustive-deps */
const [isReady] = useDebounce(
const [_isReady, _cancel] = useDebounce(
() => {
if (value !== query) {
setQuery(value);
@@ -95,7 +95,7 @@ const SearchInput = (_: SearchInputProps) => {
/>
{!value && !isMobile && <Keys>{isApple ? <Command /> : "Ctrl + "}K</Keys>}
{value ? (
isReady() ? (
value === query ? (
<X className="clear-icon" size={18} onClick={handleCancelSearch} />
) : (
<HourglassHigh className="wait-icon" weight="fill" size={18} />