diff --git a/app/(dashboard)/cars/makes/[make]/columns.tsx b/app/(dashboard)/cars/makes/[make]/columns.tsx index 7fbf6f1..56280f2 100644 --- a/app/(dashboard)/cars/makes/[make]/columns.tsx +++ b/app/(dashboard)/cars/makes/[make]/columns.tsx @@ -3,6 +3,7 @@ import Link from "next/link"; import { ArrowUpDown } from "lucide-react"; import { Button } from "@/components/ui/button"; +import { deslugify, slugify } from "@/utils/slugify"; import type { Car } from "@/types"; import type { ColumnDef } from "@tanstack/react-table"; @@ -25,9 +26,11 @@ export const columns: ColumnDef[] = [ accessorKey: "fuel_type", header: "Fuel Type", cell: ({ row }) => { - const type = row.getValue("fuel_type") as string; + const type: string = row.getValue("fuel_type"); return ( - {type} + + {deslugify(type)} + ); }, }, @@ -35,9 +38,11 @@ export const columns: ColumnDef[] = [ accessorKey: "vehicle_type", header: "Vehicle Type", cell: ({ row }) => { - const type = row.getValue("vehicle_type") as string; + const type: string = row.getValue("vehicle_type"); return ( - {type} + + {deslugify(type)} + ); }, }, diff --git a/config/index.ts b/config/index.ts index b01376d..6b2e931 100644 --- a/config/index.ts +++ b/config/index.ts @@ -17,14 +17,6 @@ const DEFAULT_API_URL = `https://api.${DOMAIN_NAME}`; const API_BASE_URL = process.env.NEXT_PUBLIC_API_URL ?? DEFAULT_API_URL; export const API_URL = `${API_BASE_URL}/${API_VERSION}`; -/** - * List of make to be excluded from the dataset because they are usually part of the following: - * - BlueSG (BLUECAR) - * - Private Hire Cars (PHC) - */ -export const EXCLUSION_LIST: string[] = ["BLUECAR"]; -export const POPULAR_MAKES_THRESHOLD: number = 8; - export enum FUEL_TYPE { DIESEL = "Diesel", ELECTRIC = "Electric", @@ -34,7 +26,7 @@ export enum FUEL_TYPE { export const HYBRID_REGEX = /^(Diesel|Petrol)-(Electric)(\s\(Plug-In\))?$/; -export const ANNOUNCEMENT = ""; +export const ANNOUNCEMENT = null; // export const ANNOUNCEMENT = // "🌟 Big Updates Ahead! Our website is getting an upgrade with awesome new features rolling out soon. Stay tuned!";