24 lines
771 B
TypeScript
24 lines
771 B
TypeScript
/* eslint-disable canonical/id-match */
|
|
'use client';
|
|
import { LinkButton } from './components';
|
|
import { type ProfileProps } from './types';
|
|
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>
|
|
);
|
|
}
|