File size: 310 Bytes
f2e9a59 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 'use client';
import dayjs from 'dayjs';
import utc from 'dayjs/plugin/utc';
import { FC } from 'react';
dayjs.extend(utc);
export const UtcToLocalDateRender: FC<{
date: string;
format: string;
}> = (props) => {
const { date, format } = props;
return <>{dayjs.utc(date).local().format(format)}</>;
};
|