From 09f8669553416d07637cdf6c7a56149c9ec4f6d5 Mon Sep 17 00:00:00 2001 From: Ardeman Date: Thu, 20 Mar 2025 12:40:20 +0800 Subject: [PATCH] feat: update TNewsResponse type to TNewsResponseData for improved data structure --- app/apis/common/get-news.ts | 1 + app/types/news.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/apis/common/get-news.ts b/app/apis/common/get-news.ts index 2960725..b0576bd 100644 --- a/app/apis/common/get-news.ts +++ b/app/apis/common/get-news.ts @@ -29,6 +29,7 @@ const dataResponseSchema = z.object({ }) export type TNewsResponse = z.infer +export type TNewsResponseData = z.infer export type TAuthorResponse = z.infer type TParameters = { categories?: string[] diff --git a/app/types/news.ts b/app/types/news.ts index 20bd3e5..ea176f6 100644 --- a/app/types/news.ts +++ b/app/types/news.ts @@ -1,7 +1,7 @@ -import type { TNewsResponse } from '~/apis/common/get-news' +import type { TNewsResponseData } from '~/apis/common/get-news' export type TNews = { title: string description: string - items: Promise<{ data: TNewsResponse[] }> + items: Promise }