2025-02-11 13:34:18 +03:00

24 lines
772 B
TypeScript

/* eslint-disable canonical/id-match */
'use client';
import { type ProfileProps } from '../types';
import { LinkButton } from './components';
import { useProfileQuery } from '@/hooks/profile';
import { Enum_Customer_Role } from '@repo/graphql/types';
export function LinksCard({ telegramId }: Readonly<ProfileProps>) {
const { data: customer } = useProfileQuery({ telegramId });
const isMaster = customer?.role === Enum_Customer_Role.Master;
return (
<div className="flex flex-col gap-4 p-4 py-0">
<LinkButton
description="Указать доступные дни и время для записи клиентов"
href="/profile/schedule"
text="График работы"
visible={isMaster}
/>
</div>
);
}