'use client'; import { CheckboxWithText, DataField, ProfileCardHeader } from './components'; import { type ProfileProps } from './types'; import { useProfileMutation, useProfileQuery } from '@/hooks/profile'; import { Enum_Customer_Role as Role } from '@repo/graphql/types'; 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 } = useProfileQuery({ telegramId }); if (!customer) return null; return (
); } export function ProfileDataCard() { const { data: customer } = useProfileQuery({}); const { mutate: updateProfile } = useProfileMutation({}); if (!customer) return null; return (
updateProfile({ role: checked ? Role.Master : Role.Client })} text="Быть мастером" />
); }