FPSMS-frontend
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

index.tsx 512 B

6 miesięcy temu
6 miesięcy temu
6 miesięcy temu
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. })