This commit is contained in:
seb
2026-10-05 09:17:04 +02:00
parent 8010436157
commit 5b4cf1683a
7 changed files with 493 additions and 221 deletions

View File

@@ -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