hopefully this works
parent
db5af2a140
commit
de70b00f42
|
@ -0,0 +1,15 @@
|
||||||
|
import React from 'react';
|
||||||
|
import MetricsTable from './MetricsTable';
|
||||||
|
import { FormattedMessage } from 'react-intl';
|
||||||
|
|
||||||
|
export default function CityTable({ websiteId, ...props }) {
|
||||||
|
return (
|
||||||
|
<MetricsTable
|
||||||
|
{...props}
|
||||||
|
title={<FormattedMessage id="metrics.city" defaultMessage="City" />}
|
||||||
|
type="city"
|
||||||
|
metric={<FormattedMessage id="metrics.visitors" defaultMessage="Visitors" />}
|
||||||
|
websiteId={websiteId}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
import React from 'react';
|
||||||
|
import MetricsTable from './MetricsTable';
|
||||||
|
import { FormattedMessage } from 'react-intl';
|
||||||
|
|
||||||
|
export default function RegionTable({ websiteId, ...props }) {
|
||||||
|
return (
|
||||||
|
<MetricsTable
|
||||||
|
{...props}
|
||||||
|
title={<FormattedMessage id="metrics.region" defaultMessage="Region" />}
|
||||||
|
type="region"
|
||||||
|
metric={<FormattedMessage id="metrics.visitors" defaultMessage="Visitors" />}
|
||||||
|
websiteId={websiteId}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
|
@ -16,6 +16,8 @@ import BrowsersTable from '../metrics/BrowsersTable';
|
||||||
import OSTable from '../metrics/OSTable';
|
import OSTable from '../metrics/OSTable';
|
||||||
import DevicesTable from '../metrics/DevicesTable';
|
import DevicesTable from '../metrics/DevicesTable';
|
||||||
import CountriesTable from '../metrics/CountriesTable';
|
import CountriesTable from '../metrics/CountriesTable';
|
||||||
|
import RegionTable from '../metrics/RegionTable';
|
||||||
|
import CityTable from '../metrics/CityTable';
|
||||||
import EventsTable from '../metrics/EventsTable';
|
import EventsTable from '../metrics/EventsTable';
|
||||||
import EventsChart from '../metrics/EventsChart';
|
import EventsChart from '../metrics/EventsChart';
|
||||||
import useFetch from 'hooks/useFetch';
|
import useFetch from 'hooks/useFetch';
|
||||||
|
@ -151,12 +153,20 @@ export default function WebsiteDetails({ websiteId }) {
|
||||||
</GridColumn>
|
</GridColumn>
|
||||||
</GridRow>
|
</GridRow>
|
||||||
<GridRow>
|
<GridRow>
|
||||||
<GridColumn xs={12} md={12} lg={8}>
|
<GridColumn md={12} lg={4}>
|
||||||
<WorldMap data={countryData} />
|
|
||||||
</GridColumn>
|
|
||||||
<GridColumn xs={12} md={12} lg={4}>
|
|
||||||
<CountriesTable {...tableProps} onDataLoad={setCountryData} />
|
<CountriesTable {...tableProps} onDataLoad={setCountryData} />
|
||||||
</GridColumn>
|
</GridColumn>
|
||||||
|
<GridColumn md={12} lg={4}>
|
||||||
|
<RegionTable {...tableProps} />
|
||||||
|
</GridColumn>
|
||||||
|
<GridColumn md={12} lg={4}>
|
||||||
|
<CityTable {...tableProps} />
|
||||||
|
</GridColumn>
|
||||||
|
</GridRow>
|
||||||
|
<GridRow>
|
||||||
|
<GridColumn xs={12} md={12} lg={12}>
|
||||||
|
<WorldMap data={countryData} />
|
||||||
|
</GridColumn>
|
||||||
</GridRow>
|
</GridRow>
|
||||||
<GridRow className={classNames({ [styles.hidden]: !eventsData?.length > 0 })}>
|
<GridRow className={classNames({ [styles.hidden]: !eventsData?.length > 0 })}>
|
||||||
<GridColumn xs={12} md={12} lg={4}>
|
<GridColumn xs={12} md={12} lg={4}>
|
||||||
|
|
Loading…
Reference in New Issue