change property names

This commit is contained in:
Brian Cao 2022-10-10 10:45:05 -07:00
parent b69dfb366b
commit 2bd336d1c9
65 changed files with 293 additions and 298 deletions

View file

@ -11,9 +11,9 @@ export default function RealtimeHeader({ websites, data, websiteId, onSelect })
const options = [
{ label: <FormattedMessage id="label.all-websites" defaultMessage="All websites" />, value: 0 },
].concat(
websites.map(({ name, website_id }, index) => ({
websites.map(({ name, id }, index) => ({
label: name,
value: website_id,
value: id,
divider: index === 0,
})),
);
@ -22,7 +22,7 @@ export default function RealtimeHeader({ websites, data, websiteId, onSelect })
const count = useMemo(() => {
return sessions.filter(
({ created_at }) => differenceInMinutes(new Date(), new Date(created_at)) <= 5,
({ createdAt }) => differenceInMinutes(new Date(), new Date(createdAt)) <= 5,
).length;
}, [sessions, websiteId]);