diff --git a/app/components/assets/list/asset-filter-chips.tsx b/app/components/assets/list/asset-filter-chips.tsx new file mode 100644 index 0000000..13de961 --- /dev/null +++ b/app/components/assets/list/asset-filter-chips.tsx @@ -0,0 +1,22 @@ +import { FilterChip } from '~/components/ui/filter-chip'; +import { ASSET_FILTER } from '~/data/assets/constants'; +import { ROUTES } from '~/data/routes'; +import type { ProjectSummary } from '~/types/project'; + +export function AssetFilterChips({ filter, projects }: { filter: string; projects: ProjectSummary[] }) { + const chips = [ + { value: ASSET_FILTER.all, label: 'All', to: ROUTES.assets }, + ...projects.map((project) => ({ value: project.id, label: project.name, to: ROUTES.assetsFiltered(project.id) })), + { value: ASSET_FILTER.unassigned, label: 'Unassigned', to: ROUTES.assetsFiltered(ASSET_FILTER.unassigned) }, + ]; + + return ( + + ); +}