by codex: feat. General Improvements
CodexBar Mobile Build / build-android (push) Successful in 21m9s
CodexBar Mobile Build / release (push) Successful in 11s

This commit is contained in:
2026-06-25 14:27:58 +02:00
parent 9dd17cf565
commit 2c31be11c4
33 changed files with 1217 additions and 296 deletions
+21
View File
@@ -0,0 +1,21 @@
import { useEffect, useState } from "react";
import { Text } from "react-native";
import { COUNTDOWN_INTERVAL_MS } from "@/lib/constants";
import { formatLastUpdated } from "@/lib/timeUtils";
export function LastUpdated({ timestamp }: { timestamp: number | null }) {
const [now, setNow] = useState(Date.now);
useEffect(() => {
const interval = setInterval(() => setNow(Date.now()), COUNTDOWN_INTERVAL_MS);
return () => clearInterval(interval);
}, []);
if (!timestamp) return null;
return (
<Text selectable className="text-xs text-neutral-400 dark:text-neutral-500">
{formatLastUpdated(timestamp, now)}
</Text>
);
}