import React from "react"; import useSWR from "swr"; import Grid from "components/grid"; import Library from "components/card/library"; import Loader from "animations/loader"; const fetcher = (url) => fetch(url).then((res) => res.json()); const Libraries = () => { const { data, error } = useSWR("/api/icons", fetcher); if (error) return
failed to load
; if (!data) return ; return ( <> {data.map((link) => ( <>
))}
); }; export default Libraries;