MCPcopy Create free account
hub / github.com/GreatStackDev/gocart / StoreInfo

Function StoreInfo

components/admin/StoreInfo.jsx:5–40  ·  view source on GitHub ↗
({store})

Source from the content-addressed store, hash-verified

3import { MapPin, Mail, Phone } from "lucide-react"
4
5const StoreInfo = ({store}) => {
6 return (
7 <div className="flex-1 space-y-2 text-sm">
8 <Image width={100} height={100} src={store.logo} alt={store.name} className="max-w-20 max-h-20 object-contain shadow rounded-full max-sm:mx-auto" />
9 <div className="flex flex-col sm:flex-row gap-3 items-center">
10 <h3 className="text-xl font-semibold text-slate-800"> {store.name} </h3>
11 <span className="text-sm">@{store.username}</span>
12
13 {/* Status Badge */}
14 <span
15 className={`text-xs font-semibold px-4 py-1 rounded-full ${store.status === 'pending'
16 ? 'bg-yellow-100 text-yellow-800'
17 : store.status === 'rejected'
18 ? 'bg-red-100 text-red-800'
19 : 'bg-green-100 text-green-800'
20 }`}
21 >
22 {store.status}
23 </span>
24 </div>
25
26 <p className="text-slate-600 my-5 max-w-2xl">{store.description}</p>
27 <p className="flex items-center gap-2"> <MapPin size={16} /> {store.address}</p>
28 <p className="flex items-center gap-2"><Phone size={16} /> {store.contact}</p>
29 <p className="flex items-center gap-2"><Mail size={16} /> {store.email}</p>
30 <p className="text-slate-700 mt-5">Applied on <span className="text-xs">{new Date(store.createdAt).toLocaleDateString()}</span> by</p>
31 <div className="flex items-center gap-2 text-sm ">
32 <Image width={36} height={36} src={store.user.image} alt={store.user.name} className="w-9 h-9 rounded-full" />
33 <div>
34 <p className="text-slate-600 font-medium">{store.user.name}</p>
35 <p className="text-slate-400">{store.user.email}</p>
36 </div>
37 </div>
38 </div>
39 )
40}
41
42export default StoreInfo

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected