diff --git a/package-lock.json b/package-lock.json index 95f85d8..c8c774f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,6 @@ "name": "anchornet-frontend", "version": "0.9.0", "dependencies": { - "@rolldown/binding-win32-x64-msvc": "1.2.0", "next": "16.1.6", "react": "19.2.3", "react-dom": "19.2.3" @@ -29,6 +28,9 @@ "typescript": "^5", "vitest": "^2.1.9" }, + "engines": { + "node": ">=20" + }, "optionalDependencies": { "@rolldown/binding-win32-x64-msvc": "^1.2.0" } diff --git a/src/components/EmptyState.tsx b/src/components/EmptyState.tsx index 3283d15..a8a4127 100644 --- a/src/components/EmptyState.tsx +++ b/src/components/EmptyState.tsx @@ -1,8 +1,12 @@ +import React from "react"; + /** Why a list is empty: no data exists yet, or active filters matched nothing. */ export type EmptyStateReason = "no-data" | "no-results"; type EmptyStateProps = { message: string; + /** Optional icon rendered above the message */ + icon?: React.ReactNode; /** Defaults to "no-data" (genuinely empty list). */ reason?: EmptyStateReason; /** Shown as a "Clear filters" action when reason is "no-results". */ @@ -14,9 +18,11 @@ export function EmptyState({ message, reason = "no-data", onClearFilters, + icon, }: EmptyStateProps) { return (
+ {icon &&
{icon}
}

{message}

{reason === "no-results" && onClearFilters ? (