fix: address onboarding review feedback

This commit is contained in:
Thomas Camlong authored and ajnart committed 2026-08-14 11:32:12 +02:00
1 parent dc71084323
commit 2566be2838
72 files changed
+7783 -280

No files matched your search

+4 -5
View File
@@ -15,8 +15,7 @@ interface SearchInputProps {
}
export const SearchInput = ({ placeholder, ariaLabel, defaultValue, flexExpand = false }: SearchInputProps) => {
// eslint-disable-next-line @typescript-eslint/unbound-method
const { replace } = useRouter();
const router = useRouter();
const pathName = usePathname();
const searchParams = useSearchParams();
const [loading, setLoading] = useState(false);
@@ -25,9 +24,9 @@ export const SearchInput = ({ placeholder, ariaLabel, defaultValue, flexExpand =
setValue(defaultValue ?? "");
setLoading(false);
}, [defaultValue]);
const handleSearchDebounced = useDebouncedCallback((value: string) => {
const handleSearchDebounced = useDebouncedCallback((nextValue: string) => {
const params = new URLSearchParams(searchParams);
const normalizedValue = value.trim();
const normalizedValue = nextValue.trim();
if (normalizedValue.length === 0) {
params.delete("search");
} else {
@@ -35,7 +34,7 @@ export const SearchInput = ({ placeholder, ariaLabel, defaultValue, flexExpand =
}
if (params.has("page")) params.set("page", "1"); // Reset page to 1
const query = params.toString();
replace(query ? `${pathName}?${query}` : pathName);
router.replace(query ? `${pathName}?${query}` : pathName);
setLoading(false);
}, 250);
+1 -1
View File
@@ -9,7 +9,7 @@ import { useSettings } from "@homarr/settings";
export interface UserProps {
name: string | null;
image: string | null;
email: string | null;
email?: string | null;
}
interface UserAvatarProps {