feat(ui) - insights - wip
This commit is contained in:
parent
9b558d444a
commit
3182cdbf06
2 changed files with 10 additions and 9 deletions
|
|
@ -12,11 +12,20 @@ const data = [
|
|||
];
|
||||
interface Props {}
|
||||
function InsightsCard(props: Props) {
|
||||
const { metricStore } = useStore();
|
||||
const { metricStore, dashboardStore } = useStore();
|
||||
const metric = metricStore.instance;
|
||||
const drillDownFilter = dashboardStore.drillDownFilter;
|
||||
const period = dashboardStore.period;
|
||||
|
||||
const clickHanddler = (e: React.MouseEvent<HTMLDivElement>) => {
|
||||
console.log(e);
|
||||
// TODO update drillDownFilter
|
||||
// const periodTimestamps = period.toTimestamps();
|
||||
// drillDownFilter.merge({
|
||||
// filters: event,
|
||||
// startTimestamp: periodTimestamps.startTimestamp,
|
||||
// endTimestamp: periodTimestamps.endTimestamp,
|
||||
// });
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -95,15 +95,7 @@ function WidgetChart(props: Props) {
|
|||
|
||||
const renderChart = () => {
|
||||
const { metricType, viewType, metricOf } = metric;
|
||||
|
||||
const metricWithData = { ...metric, data };
|
||||
if (metricType === 'sessions') {
|
||||
return <SessionWidget metric={metric} data={data} />
|
||||
}
|
||||
|
||||
// if (metricType === ERRORS) {
|
||||
// return <ErrorsWidget metric={metric} data={data} />
|
||||
// }
|
||||
|
||||
if (metricType === FUNNEL) {
|
||||
return <FunnelWidget metric={metric} data={data} isWidget={isWidget || isTemplate} />
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue