FPSMS-frontend
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

22 lines
512 B

  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. })