Fix offline banner: Snapshot's timestamp field is updatedAt
The previous commit referenced a non-existent generatedAt and slipped past a grep-based gate (grep exit 0 on finding the error). Build gate checked by exit code from here on. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -92,11 +92,11 @@ export function LanguageToggle() {
|
|||||||
function OfflineBanner() {
|
function OfflineBanner() {
|
||||||
const { t, kickoffDay, kickoffTime } = useFormat();
|
const { t, kickoffDay, kickoffTime } = useFormat();
|
||||||
const status = useTournamentStore((s) => s.status);
|
const status = useTournamentStore((s) => s.status);
|
||||||
const generatedAt = useTournamentStore((s) => s.snapshot?.generatedAt);
|
const updatedAt = useTournamentStore((s) => s.snapshot?.updatedAt);
|
||||||
if (status !== 'offline' || !generatedAt) return null;
|
if (status !== 'offline' || !updatedAt) return null;
|
||||||
return (
|
return (
|
||||||
<div className="border-b border-warning/30 bg-warning/10 px-4 py-1.5 text-center text-xs text-muted" role="status">
|
<div className="border-b border-warning/30 bg-warning/10 px-4 py-1.5 text-center text-xs text-muted" role="status">
|
||||||
{fmt(t.common.offlineBanner, { time: `${kickoffDay(generatedAt)} ${kickoffTime(generatedAt)}` })}
|
{fmt(t.common.offlineBanner, { time: `${kickoffDay(updatedAt)} ${kickoffTime(updatedAt)}` })}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user