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.
 
 

11 lines
388 B

  1. import { serverFetchJson } from "@/app/utils/fetchUtil";
  2. import { BASE_API_URL } from "@/config/api";
  3. import { cache } from "react";
  4. import { RecordTimesheetInput } from "./actions";
  5. export const fetchTimesheets = cache(async (username: string) => {
  6. return serverFetchJson<RecordTimesheetInput>(`${BASE_API_URL}/timesheets`, {
  7. next: { tags: [`timesheets_${username}`] },
  8. });
  9. });