Merge branch 'dev' into feat/um-285-report-schema

This commit is contained in:
Brian Cao 2023-05-16 20:40:58 -07:00
commit cb038a51f3
2 changed files with 5 additions and 5 deletions

View File

@ -73,13 +73,13 @@ export function MetricsTable({
const filteredData = useMemo(() => {
if (data) {
let items;
let items = data;
if (dataFilter) {
if (Array.isArray(dataFilter)) {
items = dataFilter.reduce((arr, filter) => {
return filter(arr);
}, data);
}, items);
} else {
items = dataFilter(data);
}

View File

@ -9,9 +9,9 @@ export default function RealtimeDetailsPage() {
const { id: websiteId } = router.query;
const { formatMessage, labels } = useMessages();
const { get, useQuery } = useApi();
const { data: website } = useQuery(['websites', websiteId], () =>
websiteId ? get(`/websites/${websiteId}`, { enabled: !!websiteId }) : null,
);
const { data: website } = useQuery(['websites', websiteId], () => get(`/websites/${websiteId}`), {
enabled: !!websiteId,
});
const title = `${formatMessage(labels.realtime)}${website?.name ? ` - ${website.name}` : ''}`;
if (!websiteId) {