Added tables to compare screen.

This commit is contained in:
Mike Cao 2024-05-25 09:31:38 -07:00
parent 154b559315
commit 13e11ee371
15 changed files with 199 additions and 66 deletions

View file

@ -18,7 +18,6 @@ import styles from './MetricsTable.module.css';
export interface MetricsTableProps extends ListTableProps {
websiteId: string;
domainName: string;
type?: string;
className?: string;
dataFilter?: (data: any) => any;
@ -27,6 +26,7 @@ export interface MetricsTableProps extends ListTableProps {
onDataLoad?: (data: any) => void;
onSearch?: (search: string) => void;
allowSearch?: boolean;
showMore?: boolean;
children?: ReactNode;
}
@ -39,6 +39,7 @@ export function MetricsTable({
onDataLoad,
delay = null,
allowSearch = false,
showMore = true,
children,
...props
}: MetricsTableProps) {
@ -98,7 +99,7 @@ export function MetricsTable({
)}
{!data && isLoading && !isFetched && <Loading icon="dots" />}
<div className={styles.footer}>
{data && !error && limit && (
{showMore && data && !error && limit && (
<LinkButton href={renderUrl({ view: type })} variant="quiet">
<Text>{formatMessage(labels.more)}</Text>
<Icon size="sm" rotate={dir === 'rtl' ? 180 : 0}>