"use client" import Avatar from "@/components/ui/avatar" import { Button } from "@/components/ui/button" import { unshareSandbox } from "@/lib/actions" import { Loader2, X } from "lucide-react" import { useState } from "react" export default function SharedUser({ user, sandboxId, }: { user: { id: string; name: string } sandboxId: string }) { const [loading, setLoading] = useState(false) async function handleUnshare(id: string) { setLoading(true) await unshareSandbox(sandboxId, user.id) } return (
{user.name}
) }