import { useObserver } from "mobx-react-lite"; import React from "react"; import SessionItem from "Shared/SessionItem"; import { Pagination, NoContent } from "UI"; import { useStore } from "App/mstore"; import AnimatedSVG, { ICONS } from 'Shared/AnimatedSVG/AnimatedSVG'; interface Props { metric: any; isTemplate?: boolean; isEdit?: boolean; data: any; } function CustomMetricTableSessions(props: Props) { const { isEdit = false, metric, data } = props; const { dashboardStore } = useStore(); const period = dashboardStore.period; return useObserver(() => (
No relevant sessions found for the selected time period.
} >
{data.sessions && data.sessions.map((session: any, index: any) => (
))} {isEdit && (
metric.updateKey("page", page) } limit={data.total} debounceRequest={500} />
)} {!isEdit && ( )}
)); } export default CustomMetricTableSessions; const ViewMore = ({ total, limit }: any) => total > limit && (
All {total} sessions
);