import React from 'react'; import { FormattedMessage } from 'react-intl'; import { useRouter } from 'next/router'; import WebsiteChart from 'components/metrics/WebsiteChart'; import Page from 'components/layout/Page'; import Button from 'components/common/Button'; import EmptyPlaceholder from 'components/common/EmptyPlaceholder'; import useFetch from 'hooks/useFetch'; import Arrow from 'assets/arrow-right.svg'; import styles from './WebsiteList.module.css'; export default function WebsiteList() { const router = useRouter(); const { data } = useFetch('/api/websites'); if (!data) { return null; } return ( {data.map(({ website_id, name }) => (
))} {data.length === 0 && ( } > )}
); }