feat: update TNewsResponse type to TNewsResponseData for improved data structure
This commit is contained in:
parent
731b36ef70
commit
09f8669553
@ -29,6 +29,7 @@ const dataResponseSchema = z.object({
|
|||||||
})
|
})
|
||||||
|
|
||||||
export type TNewsResponse = z.infer<typeof newsResponseSchema>
|
export type TNewsResponse = z.infer<typeof newsResponseSchema>
|
||||||
|
export type TNewsResponseData = z.infer<typeof dataResponseSchema>
|
||||||
export type TAuthorResponse = z.infer<typeof authorSchema>
|
export type TAuthorResponse = z.infer<typeof authorSchema>
|
||||||
type TParameters = {
|
type TParameters = {
|
||||||
categories?: string[]
|
categories?: string[]
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import type { TNewsResponse } from '~/apis/common/get-news'
|
import type { TNewsResponseData } from '~/apis/common/get-news'
|
||||||
|
|
||||||
export type TNews = {
|
export type TNews = {
|
||||||
title: string
|
title: string
|
||||||
description: string
|
description: string
|
||||||
items: Promise<{ data: TNewsResponse[] }>
|
items: Promise<TNewsResponseData>
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user