feat: refactor news and category schemas, update API response handling, and improve date formatting

This commit is contained in:
Ardeman
2025-03-07 08:50:04 +08:00
parent 661437a2d3
commit 1bb63bec8e
7 changed files with 92 additions and 192 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
import { useState } from 'react'
import { Link, useFetcher, useRouteLoaderData } from 'react-router'
import type { TCategorySchema } from '~/apis/common/get-categories'
import type { TCategoriesSchema } from '~/apis/common/get-categories'
import { CloseIcon } from '~/components/icons/close'
import { MenuIcon } from '~/components/icons/menu'
import { Button } from '~/components/ui/button'
@@ -10,7 +10,7 @@ import { HeaderSearch } from '~/layouts/news/header-search'
import type { loader } from '~/routes/_layout'
type THeaderMenuMobile = {
menu?: TCategorySchema['data']
menu?: TCategoriesSchema['data']
}
export default function HeaderMenuMobile(properties: THeaderMenuMobile) {