Delete assets/js/dashboard/stats/modals/conversions.tsx with huggingface_hub
Browse files
assets/js/dashboard/stats/modals/conversions.tsx
DELETED
|
@@ -1,56 +0,0 @@
|
|
| 1 |
-
import React from 'react'
|
| 2 |
-
|
| 3 |
-
import Modal from './modal'
|
| 4 |
-
import {
|
| 5 |
-
DetailsBreakdown,
|
| 6 |
-
DimensionCell,
|
| 7 |
-
DimensionCellProps
|
| 8 |
-
} from './details-breakdown'
|
| 9 |
-
import {
|
| 10 |
-
BREAKDOWN_REPORTS,
|
| 11 |
-
BreakdownReportKey
|
| 12 |
-
} from '../reports/reports-config'
|
| 13 |
-
import {
|
| 14 |
-
getConversionsStatsQuery,
|
| 15 |
-
getGoalsFilterInfo
|
| 16 |
-
} from '../behaviours/conversions'
|
| 17 |
-
import { useSiteContext } from '../../site-context'
|
| 18 |
-
|
| 19 |
-
function ConversionsModal() {
|
| 20 |
-
const site = useSiteContext()
|
| 21 |
-
|
| 22 |
-
const reportConfig = BREAKDOWN_REPORTS[BreakdownReportKey.goals]
|
| 23 |
-
|
| 24 |
-
/*global BUILD_EXTRA*/
|
| 25 |
-
const metrics = reportConfig.getMetrics({
|
| 26 |
-
isRevenueAvailable: BUILD_EXTRA && site.revenueGoals.length > 0
|
| 27 |
-
})
|
| 28 |
-
|
| 29 |
-
return (
|
| 30 |
-
<Modal>
|
| 31 |
-
<DetailsBreakdown
|
| 32 |
-
title={reportConfig.detailsTitle}
|
| 33 |
-
dimensionLabel={reportConfig.dimensionLabel}
|
| 34 |
-
dimensions={reportConfig.dimensions}
|
| 35 |
-
metrics={metrics}
|
| 36 |
-
alwaysOnFilters={reportConfig.alwaysOnFilters}
|
| 37 |
-
defaultOrderBy={[['visitors', 'desc']]}
|
| 38 |
-
DimensionElement={GoalsDimensionCell}
|
| 39 |
-
hideMetricsIfAllNull={['total_revenue', 'average_revenue']}
|
| 40 |
-
getStatsQuery={getConversionsStatsQuery}
|
| 41 |
-
/>
|
| 42 |
-
</Modal>
|
| 43 |
-
)
|
| 44 |
-
}
|
| 45 |
-
|
| 46 |
-
function GoalsDimensionCell(props: DimensionCellProps) {
|
| 47 |
-
return (
|
| 48 |
-
<DimensionCell
|
| 49 |
-
{...props}
|
| 50 |
-
text={props.row.dimensions[0]}
|
| 51 |
-
getFilterInfo={getGoalsFilterInfo}
|
| 52 |
-
/>
|
| 53 |
-
)
|
| 54 |
-
}
|
| 55 |
-
|
| 56 |
-
export default ConversionsModal
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|