Skip to content

Commit

Permalink
drop date-fns in favor of native function
Browse files Browse the repository at this point in the history
  • Loading branch information
vkozio committed Aug 9, 2024
1 parent d8935b5 commit 468bf6b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 14 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@
"cpr": "^3.0.1",
"d3-color": "^3.1.0",
"d3-interpolate": "^3.0.1",
"date-fns": "^2.30.0",
"dependency-cruiser": "^15.5.0",
"dnd-core": "^16.0.1",
"emoji-regex": "^10.3.0",
Expand Down
11 changes: 0 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions src/features/events_list/components/EventCard/EventCard.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useMemo } from 'react';
import cn from 'clsx';
import { parseISO } from 'date-fns';
import { Heading, Text } from '@konturio/ui-kit';
import ReactMarkdown from 'react-markdown';
import { nanoid } from 'nanoid';
Expand Down Expand Up @@ -40,7 +39,7 @@ export function EventCard({
showDescription?: boolean;
}) {
const formattedTime = useMemo(
() => formatTime(parseISO(event.updatedAt)),
() => formatTime(new Date(event.updatedAt)),
[event.updatedAt],
);
return (
Expand Down

0 comments on commit 468bf6b

Please sign in to comment.