2025-05-23 17:09:03 +03:00

25 lines
791 B
TypeScript

/* eslint-disable canonical/id-match */
'use client';
import { type ProfileProps } from '../types';
import { LinkButton } from './link-button';
import { useCustomerQuery } from '@/hooks/api/customers';
import { Enum_Customer_Role } from '@repo/graphql/types';
export function LinksCard({ telegramId }: Readonly<ProfileProps>) {
const { data: { customer } = {} } = useCustomerQuery({ 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>
);
}