import React, { useEffect, useState } from 'react'; import classNames from 'classnames'; import WebsiteChart from 'components/charts/WebsiteChart'; import RankingsChart from 'components/charts/RankingsChart'; import WorldMap from 'components/common/WorldMap'; import Page from 'components/layout/Page'; import PageHeader from 'components/layout/PageHeader'; import MenuLayout from 'components/layout/MenuLayout'; import Button from 'components/common/Button'; import { getDateRange } from 'lib/date'; import { get } from 'lib/web'; import { browserFilter, urlFilter, refFilter, deviceFilter, countryFilter } from 'lib/filters'; import Arrow from 'assets/arrow-right.svg'; import styles from './WebsiteDetails.module.css'; const pageviewClasses = 'col-md-12 col-lg-6'; const sessionClasses = 'col-md-12 col-lg-4'; export default function WebsiteDetails({ websiteId, defaultDateRange = '7day' }) { const [data, setData] = useState(); const [chartLoaded, setChartLoaded] = useState(false); const [countryData, setCountryData] = useState(); const [dateRange, setDateRange] = useState(getDateRange(defaultDateRange)); const [expand, setExpand] = useState(); const { startDate, endDate } = dateRange; const menuOptions = [ { render: () => ( } size="xsmall" onClick={() => setExpand(null)} >