diff --git a/client/src/routes/SearchPage.tsx b/client/src/routes/SearchPage.tsx index c0ef29f3..0b8bd579 100644 --- a/client/src/routes/SearchPage.tsx +++ b/client/src/routes/SearchPage.tsx @@ -13,7 +13,6 @@ import { Loader } from '../components/Timeline/Loader'; import { CardBox } from '../components/CardBox'; import { TypeSelect } from '../components/TypeSelect'; import { HStack } from '@chakra-ui/react'; -import { PaywallOverlay } from '../components/Paywall/PaywallOverlay'; export function SearchPage() { const fetchIdRef = useRef(0); @@ -24,12 +23,7 @@ export function SearchPage() { const [searchPaging, setSearchPaging] = useState({ pageSize: 20, pageIndex: 0 }); const [searchResult, setSearchResult] = useState([]); - const [timerange, setTimerange] = useState([ - moment() - .startOf('day') - .subtract(10, 'days'), - moment().endOf('day'), - ]); + const [timerange, setTimerange] = useState([moment().startOf('day').subtract(10, 'days'), moment().endOf('day')]); const loadItems = async (searchStr, firstPage = false) => { const fetchId = ++fetchIdRef.current; @@ -57,7 +51,7 @@ export function SearchPage() { // eslint-disable-next-line react-hooks/exhaustive-deps }, []); - const exportItems = async searchStr => { + const exportItems = async (searchStr) => { setIsLoading(true); const [from, to] = timerange; await exportFromItems({ @@ -77,14 +71,13 @@ export function SearchPage() { // eslint-disable-next-line react-hooks/exhaustive-deps }, [searchPaging]); - const onSubmit = event => { + const onSubmit = (event) => { event.preventDefault(); setSearchPaging({ ...searchPaging, pageIndex: 0 }); }; return ( -
@@ -93,14 +86,11 @@ export function SearchPage() { - setTaskName(event.target.value)} - /> + setTaskName(event.target.value)} /> setSearchText(event.target.value)} + onChange={(event) => setSearchText(event.target.value)} />