fix(awooop): avoid run timeline hydration mismatch
This commit is contained in:
@@ -767,7 +767,7 @@ export default function RunDetailPage({
|
||||
const [dossier, setDossier] = useState<ChannelEventDossierResponse | null>(null);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
const [lastRefresh, setLastRefresh] = useState<Date>(new Date());
|
||||
const [lastRefresh, setLastRefresh] = useState<Date | null>(null);
|
||||
|
||||
const fetchDetail = useCallback(async () => {
|
||||
try {
|
||||
@@ -934,7 +934,9 @@ export default function RunDetailPage({
|
||||
<h3 className="text-sm font-semibold text-[#141413]">{t("timeline.title")}</h3>
|
||||
<p className="mt-1 text-xs text-[#77736a]">
|
||||
{t("timeline.lastUpdated", {
|
||||
time: lastRefresh.toLocaleTimeString(locale === "zh-TW" ? "zh-TW" : "en-US"),
|
||||
time: lastRefresh
|
||||
? lastRefresh.toLocaleTimeString(locale === "zh-TW" ? "zh-TW" : "en-US")
|
||||
: t("empty"),
|
||||
})}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user