'use client'; import { type ProfileProps } from '../types'; import { DataField } from './text-field'; import { CardSectionHeader } from '@/components/ui'; import { useCustomerMutation, useCustomerQuery } from '@/hooks/api/customers'; import { Button } from '@repo/ui/components/ui/button'; import { Card } from '@repo/ui/components/ui/card'; import Link from 'next/link'; export function ContactDataCard({ telegramId }: Readonly) { const { data: { customer } = {} } = useCustomerQuery({ telegramId }); if (!customer) return null; return (
); } export function ProfileDataCard() { const { data: { customer } = {} } = useCustomerQuery(); const { mutate: updateCustomer } = useCustomerMutation(); if (!customer) return null; return (
updateCustomer({ data: { name } })} value={customer?.name ?? ''} /> {/* updateCustomer({ data: { role: checked ? Role.Master : Role.Client }, }) } text="Быть мастером" /> */}
); }