feat: add views field to news response schema and update dashboard pages

This commit is contained in:
Ardeman
2025-03-24 15:45:43 +08:00
parent 1c33eba834
commit 65f7bbe0aa
4 changed files with 29 additions and 15 deletions
+2 -1
View File
@@ -14,7 +14,7 @@ import { Button } from '~/components/ui/button'
import { UiTable } from '~/components/ui/table'
import { TitleDashboard } from '~/components/ui/title-dashboard'
import type { loader } from '~/routes/_admin.lg-admin._dashboard.advertisements._index'
import { formatDate } from '~/utils/formatter'
import { formatDate, formatNumberWithPeriods } from '~/utils/formatter'
export const AdvertisementsPage = () => {
const loaderData = useRouteLoaderData<typeof loader>(
@@ -70,6 +70,7 @@ export const AdvertisementsPage = () => {
/>
)
},
5: (value: number) => formatNumberWithPeriods(value),
6: (value: string, _type: unknown, data: TAdResponse) => (
<div className="flex space-x-2">
<Button