import { useMessages, useUpdateQuery } from '@/components/hooks'; import { ROLES } from '@/lib/constants'; import { Button, Select, Form, FormButtons, FormField, ListItem, FormSubmitButton, } from '@umami/react-zen'; export function TeamMemberEditForm({ teamId, userId, role, onSave, onClose, }: { teamId: string; userId: string; role: string; onSave?: () => void; onClose?: () => void; }) { const { mutateAsync, error, isPending } = useUpdateQuery(`/teams/${teamId}/users/${userId}`); const { formatMessage, labels, getErrorMessage } = useMessages(); const handleSubmit = async (data: any) => { await mutateAsync(data, { onSuccess: async () => { onSave(); onClose(); }, }); }; return (
); }