import { Card, CardBody, CardHeader } from "@wordpress/components";
import { __ } from "@wordpress/i18n";
import { decodeEntities } from "@wordpress/html-entities";
import usePluginSelectedStore from "@/stores/pluginSelectedStore";
import { useRelated } from "@/hooks/useRelated";
import { extractChildrenFromTag } from "@/shared/utils/html";
const Related = () => {
const {plugin, setPlugin} = usePluginSelectedStore()
const { data, isLoading } = useRelated(plugin?.slug ?? '')
return (
<>
{ isLoading && (
{__('Getting Related Plugins...', 'ploogins-ai-assistant')}
)}
{
data && data.length > 0 && (
{__('Related Plugins', 'ploogins-ai-assistant')}
{data.map((plugin: any) => (
))}
)
}
>
)
}
export default Related