fix: align moments range and failed filter
This commit is contained in:
@@ -204,10 +204,14 @@ export function TimelineTree(props: {
|
||||
setMomentsError(null);
|
||||
if (!rows || rows.length === 0) return;
|
||||
const start = rows[0]?.group_ts ?? null;
|
||||
const end = rows[rows.length - 1]?.group_ts ?? null;
|
||||
const last = rows[rows.length - 1]?.group_ts ?? null;
|
||||
const end = last
|
||||
? new Date(new Date(last).getTime() + 24 * 60 * 60 * 1000).toISOString()
|
||||
: null;
|
||||
const params = new URLSearchParams();
|
||||
if (start) params.set("start", start);
|
||||
if (end) params.set("end", end);
|
||||
params.set("includeFailed", "1");
|
||||
const res = await fetch(`/api/moments?${params.toString()}`, {
|
||||
cache: "no-store",
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user