move OrderCard types close to component
This commit is contained in:
parent
efebc9d8ef
commit
25f6e26901
@ -1,5 +1,3 @@
|
||||
import type * as GQL from '@repo/graphql/types';
|
||||
|
||||
export type OrderClient = NonNullable<GQL.GetOrderQuery['order']>['client'];
|
||||
export type OrderComponentProps = GQL.OrderFieldsFragment;
|
||||
export type SlotComponentProps = GQL.SlotFieldsFragment;
|
||||
|
||||
@ -1,14 +1,17 @@
|
||||
/* eslint-disable canonical/id-match */
|
||||
'use client';
|
||||
|
||||
import { type OrderClient, type OrderComponentProps } from '../schedule/types';
|
||||
import { ReadonlyTimeRange } from './time-range/readonly';
|
||||
import { Enum_Order_State } from '@repo/graphql/types';
|
||||
import type * as GQL from '@repo/graphql/types';
|
||||
import { Avatar, AvatarFallback, AvatarImage } from '@repo/ui/components/ui/avatar';
|
||||
import { Badge } from '@repo/ui/components/ui/badge';
|
||||
import { cn } from '@repo/ui/lib/utils';
|
||||
import Link from 'next/link';
|
||||
|
||||
type OrderClient = NonNullable<OrderComponentProps>['client'];
|
||||
type OrderComponentProps = GQL.OrderFieldsFragment;
|
||||
|
||||
export function OrderCard({ documentId, ...order }: Readonly<OrderComponentProps>) {
|
||||
const isCompleted = order?.state === Enum_Order_State.Completed;
|
||||
const isCancelled = order?.state === Enum_Order_State.Cancelled;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user