import { LogDto } from "@montelo/browser-client";
import { dayjs } from "~/utils/dayjs";

export const formatLogDates = (logs: LogDto[], timezone: string | undefined): LogDto[] => {
  return logs.map((log) => {
    return {
      ...log,
      createdAt: dayjs(log.createdAt).tz(timezone).format("h:mm:ssa"),
      startTime: dayjs(log.startTime).tz(timezone).format("h:mm:ssa"),
    };
  });
};
