From ca8d88bfc3d40f0d3d4db665339ae4d093311fda Mon Sep 17 00:00:00 2001 From: vchikalkin Date: Sun, 8 Jun 2025 17:30:22 +0300 Subject: [PATCH] SlotCard: use SlotComponentProps type --- apps/web/components/schedule/day-slots-list/slot-card.tsx | 5 +++-- apps/web/components/schedule/types/index.tsx | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/web/components/schedule/day-slots-list/slot-card.tsx b/apps/web/components/schedule/day-slots-list/slot-card.tsx index 97f07c0..c336de3 100644 --- a/apps/web/components/schedule/day-slots-list/slot-card.tsx +++ b/apps/web/components/schedule/day-slots-list/slot-card.tsx @@ -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 = { reserved: 'Зарезервировано', }; -export function SlotCard(props: Readonly) { +export function SlotCard(props: Readonly) { const pathname = usePathname(); const { documentId } = props; diff --git a/apps/web/components/schedule/types/index.tsx b/apps/web/components/schedule/types/index.tsx index 9a2f269..fda2c2e 100644 --- a/apps/web/components/schedule/types/index.tsx +++ b/apps/web/components/schedule/types/index.tsx @@ -2,4 +2,4 @@ import type * as GQL from '@repo/graphql/types'; export type OrderClient = NonNullable['client']; export type OrderComponentProps = GQL.OrderFieldsFragment; -export type SlotComponentProps = Pick; +export type SlotComponentProps = GQL.SlotFieldsFragment;