FPSMS-frontend
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

index.tsx 512 B

6ヶ月前
12345678910111213141516171819202122
  1. import { serverFetchJson } from "@/app/utils/fetchUtil";
  2. import { BASE_API_URL } from "@/config/api";
  3. import { cache } from "react";
  4. export interface DoResult {
  5. id: number,
  6. code: string,
  7. orderDate: string,
  8. estimatedArrivalDate: string,
  9. status: string,
  10. shopName: string,
  11. }
  12. export const preloadDo = () => {
  13. fetchDoList();
  14. }
  15. export const fetchDoList = cache(async () => {
  16. return serverFetchJson<DoResult[]>(`${BASE_API_URL}/do/list`, {
  17. next: { tags: ["doList"] }
  18. })
  19. })