From 8bac33ef793b44cac39a7c90529fe18dc3e4943a Mon Sep 17 00:00:00 2001 From: vchikalkin Date: Fri, 23 May 2025 17:09:03 +0300 Subject: [PATCH] refactor components/profile --- apps/web/components/profile/components/index.ts | 3 --- .../profile/{components => data-card}/checkbox-field.tsx | 0 .../profile/{data-card.tsx => data-card/index.tsx} | 7 ++++--- .../profile/{components => data-card}/text-field.tsx | 0 .../profile/{links-card.tsx => links-card/index.tsx} | 4 ++-- .../profile/{components => links-card}/link-button.tsx | 0 apps/web/components/profile/person-card.tsx | 2 +- 7 files changed, 7 insertions(+), 9 deletions(-) delete mode 100644 apps/web/components/profile/components/index.ts rename apps/web/components/profile/{components => data-card}/checkbox-field.tsx (100%) rename apps/web/components/profile/{data-card.tsx => data-card/index.tsx} (91%) rename apps/web/components/profile/{components => data-card}/text-field.tsx (100%) rename apps/web/components/profile/{links-card.tsx => links-card/index.tsx} (88%) rename apps/web/components/profile/{components => links-card}/link-button.tsx (100%) diff --git a/apps/web/components/profile/components/index.ts b/apps/web/components/profile/components/index.ts deleted file mode 100644 index a1e6bef..0000000 --- a/apps/web/components/profile/components/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './checkbox-field'; -export * from './link-button'; -export * from './text-field'; diff --git a/apps/web/components/profile/components/checkbox-field.tsx b/apps/web/components/profile/data-card/checkbox-field.tsx similarity index 100% rename from apps/web/components/profile/components/checkbox-field.tsx rename to apps/web/components/profile/data-card/checkbox-field.tsx diff --git a/apps/web/components/profile/data-card.tsx b/apps/web/components/profile/data-card/index.tsx similarity index 91% rename from apps/web/components/profile/data-card.tsx rename to apps/web/components/profile/data-card/index.tsx index f13993f..1aae939 100644 --- a/apps/web/components/profile/data-card.tsx +++ b/apps/web/components/profile/data-card/index.tsx @@ -1,8 +1,9 @@ 'use client'; -import { CardSectionHeader } from '../ui'; -import { CheckboxWithText, DataField } from './components'; -import { type ProfileProps } from './types'; +import { type ProfileProps } from '../types'; +import { CheckboxWithText } from './checkbox-field'; +import { DataField } from './text-field'; +import { CardSectionHeader } from '@/components/ui'; import { useCustomerMutation, useCustomerQuery } from '@/hooks/api/customers'; import { Enum_Customer_Role as Role } from '@repo/graphql/types'; import { Button } from '@repo/ui/components/ui/button'; diff --git a/apps/web/components/profile/components/text-field.tsx b/apps/web/components/profile/data-card/text-field.tsx similarity index 100% rename from apps/web/components/profile/components/text-field.tsx rename to apps/web/components/profile/data-card/text-field.tsx diff --git a/apps/web/components/profile/links-card.tsx b/apps/web/components/profile/links-card/index.tsx similarity index 88% rename from apps/web/components/profile/links-card.tsx rename to apps/web/components/profile/links-card/index.tsx index b6f8262..b938d54 100644 --- a/apps/web/components/profile/links-card.tsx +++ b/apps/web/components/profile/links-card/index.tsx @@ -1,8 +1,8 @@ /* eslint-disable canonical/id-match */ 'use client'; -import { LinkButton } from './components'; -import { type ProfileProps } from './types'; +import { type ProfileProps } from '../types'; +import { LinkButton } from './link-button'; import { useCustomerQuery } from '@/hooks/api/customers'; import { Enum_Customer_Role } from '@repo/graphql/types'; diff --git a/apps/web/components/profile/components/link-button.tsx b/apps/web/components/profile/links-card/link-button.tsx similarity index 100% rename from apps/web/components/profile/components/link-button.tsx rename to apps/web/components/profile/links-card/link-button.tsx diff --git a/apps/web/components/profile/person-card.tsx b/apps/web/components/profile/person-card.tsx index f7ac660..bbd5cb3 100644 --- a/apps/web/components/profile/person-card.tsx +++ b/apps/web/components/profile/person-card.tsx @@ -1,7 +1,7 @@ 'use client'; -import { LoadingSpinner } from '../common/spinner'; import { type ProfileProps } from './types'; +import { LoadingSpinner } from '@/components/common/spinner'; import { useCustomerQuery } from '@/hooks/api/customers'; import { Avatar, AvatarFallback, AvatarImage } from '@repo/ui/components/ui/avatar'; import { Card } from '@repo/ui/components/ui/card';