diff --git a/apps/web/components/profile/cards/data-card.tsx b/apps/web/components/profile/cards/data-card.tsx index 08c6058..b36ed21 100644 --- a/apps/web/components/profile/cards/data-card.tsx +++ b/apps/web/components/profile/cards/data-card.tsx @@ -1,8 +1,8 @@ 'use client'; import { type ProfileProps } from '../types'; import { CheckboxWithText, DataField, ProfileCardHeader } from './components'; -import { updateRole } from './lib/actions'; import { useProfile, useProfileMutation } 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'; @@ -49,7 +49,7 @@ export function ProfileDataCard() { updateProfile({ role: checked ? Role.Master : Role.Client })} text="Быть мастером" /> diff --git a/apps/web/components/profile/cards/lib/actions.ts b/apps/web/components/profile/cards/lib/actions.ts deleted file mode 100644 index 89f289b..0000000 --- a/apps/web/components/profile/cards/lib/actions.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* eslint-disable canonical/id-match */ -import { updateProfile } from '@/actions/profile'; -import { Enum_Customer_Role } from '@repo/graphql/types'; - -export function updateRole(checked: boolean) { - return updateProfile({ - role: checked ? Enum_Customer_Role.Master : Enum_Customer_Role.Client, - }); -}