From b16fa5e21a3852151c6b3d3d5569154d863d1795 Mon Sep 17 00:00:00 2001
From: Mohamed Bassem <me@mbassem.com>
Date: Sun, 1 Feb 2026 19:26:23 +0000
Subject: chore: replace dayjs with data-fns

---
 apps/mobile/components/highlights/HighlightCard.tsx | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

(limited to 'apps/mobile/components/highlights/HighlightCard.tsx')

diff --git a/apps/mobile/components/highlights/HighlightCard.tsx b/apps/mobile/components/highlights/HighlightCard.tsx
index fd5ff752..31b3c829 100644
--- a/apps/mobile/components/highlights/HighlightCard.tsx
+++ b/apps/mobile/components/highlights/HighlightCard.tsx
@@ -3,8 +3,7 @@ import * as Haptics from "expo-haptics";
 import { useRouter } from "expo-router";
 import { Text } from "@/components/ui/Text";
 import { useQuery } from "@tanstack/react-query";
-import dayjs from "dayjs";
-import relativeTime from "dayjs/plugin/relativeTime";
+import { formatDistanceToNow } from "date-fns";
 import { ExternalLink, Trash2 } from "lucide-react-native";
 
 import type { ZHighlight } from "@karakeep/shared/types/highlights";
@@ -13,8 +12,6 @@ import { useTRPC } from "@karakeep/shared-react/trpc";
 
 import { useToast } from "../ui/Toast";
 
-dayjs.extend(relativeTime);
-
 // Color map for highlights (mapped to Tailwind CSS classes used in NativeWind)
 const HIGHLIGHT_COLOR_MAP = {
   red: "#fecaca", // bg-red-200
@@ -108,7 +105,7 @@ export default function HighlightCard({
         <View className="flex flex-row items-center justify-between">
           <View className="flex flex-row items-center gap-2">
             <Text className="text-xs text-muted-foreground">
-              {dayjs(highlight.createdAt).fromNow()}
+              {formatDistanceToNow(highlight.createdAt, { addSuffix: true })}
             </Text>
             {bookmark && (
               <>
-- 
cgit v1.2.3-70-g09d2

