SlotCard: use SlotComponentProps type

This commit is contained in:
vchikalkin 2025-06-08 17:30:22 +03:00
parent d085a3d24d
commit ca8d88bfc3
2 changed files with 4 additions and 3 deletions

View File

@ -1,9 +1,10 @@
/* eslint-disable canonical/id-match */
'use client';
import { type SlotComponentProps } from '../types';
import { ReadonlyTimeRange } from '@/components/shared/time-range';
import { useSlotQuery } from '@/hooks/api/slots';
import { Enum_Slot_State, type SlotFieldsFragment } from '@repo/graphql/types';
import { Enum_Slot_State } from '@repo/graphql/types';
import { Badge } from '@repo/ui/components/ui/badge';
import { cn } from '@repo/ui/lib/utils';
import Link from 'next/link';
@ -15,7 +16,7 @@ const MAP_BADGE_TEXT: Record<Enum_Slot_State, string> = {
reserved: 'Зарезервировано',
};
export function SlotCard(props: Readonly<SlotFieldsFragment>) {
export function SlotCard(props: Readonly<SlotComponentProps>) {
const pathname = usePathname();
const { documentId } = props;

View File

@ -2,4 +2,4 @@ import type * as GQL from '@repo/graphql/types';
export type OrderClient = NonNullable<GQL.GetOrderQuery['order']>['client'];
export type OrderComponentProps = GQL.OrderFieldsFragment;
export type SlotComponentProps = Pick<GQL.SlotFieldsFragment, 'documentId'>;
export type SlotComponentProps = GQL.SlotFieldsFragment;