25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

20 lines
446 B

  1. import { serverFetchJson } from "@/app/utils/fetchUtil";
  2. import { BASE_API_URL } from "@/config/api";
  3. import { cache } from "react";
  4. import "server-only";
  5. export interface TeamResult {
  6. action: any;
  7. id: number;
  8. name: string;
  9. code: string;
  10. description: string;
  11. }
  12. export const fetchTeam = cache(async () => {
  13. return serverFetchJson<TeamResult[]>(`${BASE_API_URL}/team`, {
  14. next: { tags: ["team"] },
  15. });
  16. });