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';
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 (
}
type="url"
metric={}
headerComponent={
limit ? null :
}
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 ;
};