frontend-rw #1

Merged
marcin merged 347 commits from frontend-rw into develop 2024-12-05 15:32:18 -08:00
Showing only changes of commit 7c1d237222 - Show all commits

View file

@ -1,6 +1,5 @@
import clsx from 'clsx';
import debounce from 'lodash/debounce';
import React, { useCallback, useState } from 'react';
import React, { useState } from 'react';
import { defineMessages, useIntl } from 'react-intl';
import { useSearchParams } from 'react-router-dom-v5-compat';
@ -21,15 +20,10 @@ const Search = () => {
setParams(params => ({ ...Object.fromEntries(params.entries()), q: value }));
};
const debouncedSubmit = useCallback(debounce((value: string) => {
setQuery(value);
}, 900), []);
const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
const { value } = event.target;
setValue(value);
debouncedSubmit(value);
};
const handleClear = (event: React.MouseEvent<HTMLDivElement>) => {