import useGetFontsType from "../hooks/getFontsType"; import { BuilderDownArrow } from "../components/icons/builder"; import { SimplePlusIcon } from "../components/icons/ui"; import { useEffect, useState } from "@wordpress/element"; const CustomFront = () => { const [fontList, setFontList] = useState([]); const myAdminUrl = window.location.href.split("/wp-admin")[0].toString(); const fontData = useGetFontsType(myAdminUrl); useEffect(() => { setFontList(fontData); }, [fontData]); return (
{ e.preventDefault(); }} >
  • Font Family preview file type date Action
  • {fontList?.length === 0 ? (
  • No Data Found
  • ) : (
  • Hello World!!
  • )}
); }; export default CustomFront;