u
This commit is contained in:
@@ -8,8 +8,8 @@ export default function withSearchParams(Wrapped) {
|
||||
const navigate = useNavigate();
|
||||
|
||||
useEffect(() => {
|
||||
const query = queryFromParams(searchParams);
|
||||
if (query.target.trim().length >= 3) return;
|
||||
const currentTarget = searchParams.get('target');
|
||||
if (currentTarget != null && currentTarget.trim().length > 0) return;
|
||||
|
||||
const stored = readArtikelQuery();
|
||||
if (!stored?.target || stored.target.trim().length < 3) return;
|
||||
@@ -18,7 +18,7 @@ export default function withSearchParams(Wrapped) {
|
||||
buildSearchUrl(stored.target, stored.filter ?? '', stored.offset ?? 0),
|
||||
{ replace: true },
|
||||
);
|
||||
}, [searchParams, navigate]);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Wrapped
|
||||
|
||||
Reference in New Issue
Block a user