| Server IP : 145.239.37.162 / Your IP : 216.73.217.81 Web Server : Apache System : Linux webm003.cluster130.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : verseaa ( 38250) PHP Version : 7.4.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/verseaa/www_old/wp-content/plugins/envato-elements/src/js/react/components/Card/ |
Upload File : |
import React, { useState } from 'react'
import { Link, useRouteMatch } from 'react-router-dom'
import ItemCard from './ItemCard'
import GridItem from '../Grid/GridItem'
import DeleteTemplateKit from '../Buttons/DeleteTemplateKit'
import ViewInstalledKitButton from '../Buttons/InternalLinkButton'
import ButtonWrapper from '../Buttons/ButtonWrapper'
import styles from './KitCard.module.scss'
const KitCard = ({ item }) => {
const { url } = useRouteMatch()
const [kitDeleted, setKitDeleted] = useState(false)
if (kitDeleted) {
return null
}
return (
<GridItem colWidthPercentage={33} className={styles.itemCard}>
<ItemCard
Images={(
<Link to={`${url}/kit/${item.id}`} className={styles.itemImageLink}>
<img src={item.screenshot_url} alt={item.title} className={styles.itemImage} />
</Link>
)}
Buttons={(
<ButtonWrapper>
<ViewInstalledKitButton type='primary' label='View Installed Kit' icon='plus' href={`${url}/kit/${item.id}`} />
<div className={styles.itemDelete}>
<DeleteTemplateKit
templateKitId={item.id}
completeCallback={() => {
setKitDeleted(true)
}}
/>
</div>
</ButtonWrapper>
)}
title={item.title}
description={`Contains ${item.template_count} templates`}
/>
</GridItem>
)
}
export default KitCard