Refine git time formatting
This commit is contained in:
parent
d5809547ea
commit
823476795d
@ -51,12 +51,12 @@ import MaskedScroll from '@/components/MaskedScroll';
|
|||||||
import IconNext from '@/components/icons/IconNext';
|
import IconNext from '@/components/icons/IconNext';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import IconNode from '@/components/icons/IconNode';
|
import IconNode from '@/components/icons/IconNode';
|
||||||
import { formatDistanceToNow } from 'date-fns';
|
import { formatDistanceToNowStrict } from 'date-fns';
|
||||||
import ResponsiveText from '@/components/primitives/ResponsiveText';
|
import ResponsiveText from '@/components/primitives/ResponsiveText';
|
||||||
|
|
||||||
const DEBUG_COMMIT_SHA = '4cd29ed';
|
const DEBUG_COMMIT_SHA = '4cd29ed';
|
||||||
const DEBUG_COMMIT_MESSAGE = 'Long commit message for debugging purposes';
|
const DEBUG_COMMIT_MESSAGE = 'Long commit message for debugging purposes';
|
||||||
const DEBUG_COMMIT_DATE = new Date('2026-02-18T00:00:00Z');
|
const DEBUG_COMMIT_DATE = new Date('2026-02-22T00:00:00Z');
|
||||||
const DEBUG_BEHIND_BY = 9;
|
const DEBUG_BEHIND_BY = 9;
|
||||||
const DEBUG_PHOTOS_NEED_SYNC_COUNT = 7;
|
const DEBUG_PHOTOS_NEED_SYNC_COUNT = 7;
|
||||||
|
|
||||||
@ -288,12 +288,12 @@ export default function AdminAppInsightsClient({
|
|||||||
</span>
|
</span>
|
||||||
<span className="text-dim">
|
<span className="text-dim">
|
||||||
(<ResponsiveText
|
(<ResponsiveText
|
||||||
shortText={formatDistanceToNow(
|
shortText={formatDistanceToNowStrict(
|
||||||
codeMeta?.commitDate ?? DEBUG_COMMIT_DATE,
|
codeMeta?.commitDate ?? DEBUG_COMMIT_DATE,
|
||||||
)}
|
)}
|
||||||
className="truncate"
|
className="whitespace-nowrap"
|
||||||
>
|
>
|
||||||
{formatDistanceToNow(
|
{formatDistanceToNowStrict(
|
||||||
codeMeta?.commitDate ?? DEBUG_COMMIT_DATE,
|
codeMeta?.commitDate ?? DEBUG_COMMIT_DATE,
|
||||||
{ addSuffix: true },
|
{ addSuffix: true },
|
||||||
)}
|
)}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user