refactor: add 'clicked' field to ad response schema and update dashboard display
This commit is contained in:
parent
d32eb2e7ed
commit
22918b8bdb
@ -8,6 +8,7 @@ const adResponseSchema = z.object({
|
||||
url: z.string(),
|
||||
start_date: z.string(),
|
||||
end_date: z.string(),
|
||||
clicked: z.number(),
|
||||
})
|
||||
const adsResponseSchema = z.object({
|
||||
data: z.array(adResponseSchema),
|
||||
|
||||
@ -51,6 +51,10 @@ export const AdvertisementsPage = () => {
|
||||
return formatDate(data)
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'Diklik',
|
||||
data: 'clicked',
|
||||
},
|
||||
{
|
||||
title: 'Action',
|
||||
data: 'id',
|
||||
@ -66,7 +70,7 @@ export const AdvertisementsPage = () => {
|
||||
/>
|
||||
)
|
||||
},
|
||||
5: (value: string, _type: unknown, data: TAdResponse) => (
|
||||
6: (value: string, _type: unknown, data: TAdResponse) => (
|
||||
<div className="flex space-x-2">
|
||||
<Button
|
||||
as="a"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user