import React, { useState, useEffect } from 'react'; import Link from './Link'; import WebsiteChart from './WebsiteChart'; import Page from './Page'; import Icon from './Icon'; import { get } from 'lib/web'; import Arrow from 'assets/arrow-right.svg'; import styles from './WebsiteList.module.css'; export default function WebsiteList() { const [data, setData] = useState(); async function loadData() { setData(await get(`/api/website`)); } useEffect(() => { loadData(); }, []); return ( {data && data.websites.map(({ website_id, label }) => (

{label}

} /> View details
))}
); }