diff --git a/frontend/app/components/Dashboard/components/Alerts/AlertsList.tsx b/frontend/app/components/Dashboard/components/Alerts/AlertsList.tsx index 74979f73b..75a474d01 100644 --- a/frontend/app/components/Dashboard/components/Alerts/AlertsList.tsx +++ b/frontend/app/components/Dashboard/components/Alerts/AlertsList.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { NoContent, Pagination } from 'UI'; +import { Loader, NoContent, Pagination } from 'UI'; import { filterList } from 'App/utils'; import { sliceListPerPage } from 'App/utils'; import AnimatedSVG, { ICONS } from 'Shared/AnimatedSVG/AnimatedSVG'; @@ -31,46 +31,48 @@ function AlertsList({ siteId }: Props) { const list = alertsSearch !== '' ? filteredAlerts : alertsArray; return ( - - -
- {alertsSearch !== '' ? 'No matching results' : "You haven't created any alerts yet"} + + + +
+ {alertsSearch !== '' ? 'No matching results' : 'You haven\'t created any alerts yet'} +
- - } - subtext="Configure alerts to stay informed about app activity with threshold or change-based notifications." - > -
-
-
Title
-
Type
-
Modified
+ } + subtext='Configure alerts to stay informed about app activity with threshold or change-based notifications.' + > +
+
+
Title
+
Type
+
Modified
+
+ + {sliceListPerPage(list, page - 1, pageSize).map((alert: any) => ( + + + + ))}
- {sliceListPerPage(list, page - 1, pageSize).map((alert: any) => ( - - - - ))} -
- -
-
- Showing {Math.min(list.length, pageSize)} out of{' '} - {list.length} Alerts +
+
+ Showing {Math.min(list.length, pageSize)} out of{' '} + {list.length} Alerts +
+ alertsStore.updateKey('page', page)} + limit={pageSize} + debounceRequest={100} + />
- alertsStore.updateKey('page', page)} - limit={pageSize} - debounceRequest={100} - /> -
- + + ); } diff --git a/frontend/app/components/Dashboard/components/MetricsList/MetricsList.tsx b/frontend/app/components/Dashboard/components/MetricsList/MetricsList.tsx index b8a872685..a55a62618 100644 --- a/frontend/app/components/Dashboard/components/MetricsList/MetricsList.tsx +++ b/frontend/app/components/Dashboard/components/MetricsList/MetricsList.tsx @@ -8,9 +8,9 @@ import ListView from './ListView'; import AnimatedSVG, { ICONS } from 'Shared/AnimatedSVG/AnimatedSVG'; function MetricsList({ - siteId, - onSelectionChange, -}: { + siteId, + onSelectionChange + }: { siteId: string; onSelectionChange?: (selected: any[]) => void; }) { @@ -18,7 +18,7 @@ function MetricsList({ const metricsSearch = metricStore.filter.query; const listView = useObserver(() => metricStore.listView); const [selectedMetrics, setSelectedMetrics] = useState([]); - + const dashboard = dashboardStore.selectedDashboard; const existingCardIds = useMemo(() => dashboard?.widgets?.map(i => parseInt(i.metricId)), [dashboard]); const cards = useMemo(() => !!onSelectionChange ? metricStore.filteredCards.filter(i => !existingCardIds?.includes(parseInt(i.metricId))) : metricStore.filteredCards, [metricStore.filteredCards]); @@ -54,14 +54,14 @@ function MetricsList({ +
-
- {metricsSearch !== '' ? 'No matching results' : "You haven't created any cards yet"} +
+ {metricsSearch !== '' ? 'No matching results' : 'You haven\'t created any cards yet'}
} - subtext="Utilize cards to visualize key user interactions or product performance metrics." + subtext='Utilize cards to visualize key user interactions or product performance metrics.' > {listView ? ( )} -
-
+
+
Showing{' '} - {Math.min(cards.length, metricStore.pageSize)} out - of {cards.length} cards + {Math.min(cards.length, metricStore.pageSize)} out + of {cards.length} cards