import React, { useState } from 'react';
import { FormattedMessage } from 'react-intl';
import ButtonGroup from 'components/common/ButtonGroup';
import { urlFilter } from 'lib/filters';
import { FILTER_COMBINED, FILTER_RAW } from 'lib/constants';
import MetricsTable from './MetricsTable';
import ButtonLayout from '../layout/ButtonLayout';
export default function PagesTable({ websiteId, token, websiteDomain, limit, onExpand }) {
const [filter, setFilter] = useState(FILTER_COMBINED);
const buttons = [
{
label: ,
value: FILTER_COMBINED,
},
{ label: , value: FILTER_RAW },
];
return (
<>
{!limit && }
}
type="url"
metric={}
websiteId={websiteId}
token={token}
limit={limit}
dataFilter={urlFilter}
filterOptions={{ domain: websiteDomain, raw: filter === FILTER_RAW }}
renderLabel={({ x }) => decodeURI(x)}
onExpand={onExpand}
/>
>
);
}
const FilterButtons = ({ buttons, selected, onClick }) => {
return (
);
};