|
"use client" |
|
|
|
import React from 'react' |
|
import Link from 'next/link' |
|
import '@/app/components/PerChatCard.css' |
|
const PerChatCard = ({data, open, setOpen, setData}) => { |
|
|
|
|
|
const api = data |
|
const handleClick = (data)=>{ |
|
if (!open){ |
|
setData(data) |
|
} |
|
setOpen(!open) |
|
} |
|
return ( |
|
<div className="apicard"> |
|
|
|
<button className="btn2" style={{width: '100%'}} onClick={()=>handleClick(data)}><i className="animation"></i><span className="">{data.name}</span><i className="animation"></i></button> |
|
|
|
</div> |
|
|
|
) |
|
} |
|
|
|
export default PerChatCard |