From 313b0dc8fe10aa85e6d29de63a672568e1b2bf23 Mon Sep 17 00:00:00 2001 From: vchikalkin Date: Wed, 29 Jan 2025 17:16:53 +0300 Subject: [PATCH] components/profile: organize files & folders --- apps/web/components/profile/{ => cards}/card-header.tsx | 0 apps/web/components/profile/{ => cards}/data-card.tsx | 8 ++++---- apps/web/components/profile/cards/index.ts | 2 ++ apps/web/components/profile/{ => cards}/person-card.tsx | 2 +- .../components/profile/{ => fields}/checkbox-field.tsx | 0 apps/web/components/profile/{ => fields}/text-field.tsx | 0 apps/web/components/profile/index.ts | 3 +-- 7 files changed, 8 insertions(+), 7 deletions(-) rename apps/web/components/profile/{ => cards}/card-header.tsx (100%) rename apps/web/components/profile/{ => cards}/data-card.tsx (89%) create mode 100644 apps/web/components/profile/cards/index.ts rename apps/web/components/profile/{ => cards}/person-card.tsx (95%) rename apps/web/components/profile/{ => fields}/checkbox-field.tsx (100%) rename apps/web/components/profile/{ => fields}/text-field.tsx (100%) diff --git a/apps/web/components/profile/card-header.tsx b/apps/web/components/profile/cards/card-header.tsx similarity index 100% rename from apps/web/components/profile/card-header.tsx rename to apps/web/components/profile/cards/card-header.tsx diff --git a/apps/web/components/profile/data-card.tsx b/apps/web/components/profile/cards/data-card.tsx similarity index 89% rename from apps/web/components/profile/data-card.tsx rename to apps/web/components/profile/cards/data-card.tsx index 7b04ee0..a2c05e4 100644 --- a/apps/web/components/profile/data-card.tsx +++ b/apps/web/components/profile/cards/data-card.tsx @@ -1,10 +1,10 @@ 'use client'; +import { updateRole } from '../lib/actions'; +import { type ProfileProps } from '../types'; import { ProfileCardHeader } from './card-header'; -import { updateRole } from './lib/actions'; -import { type ProfileProps } from './types'; import { getProfile, updateProfile } from '@/actions/profile'; -import { CheckboxWithText } from '@/components/profile/checkbox-field'; -import { DataField } from '@/components/profile/text-field'; +import { CheckboxWithText } from '@/components/profile/fields/checkbox-field'; +import { DataField } from '@/components/profile/fields/text-field'; import { Button } from '@repo/ui/components/ui/button'; import { Card } from '@repo/ui/components/ui/card'; import { useQuery } from '@tanstack/react-query'; diff --git a/apps/web/components/profile/cards/index.ts b/apps/web/components/profile/cards/index.ts new file mode 100644 index 0000000..ddd60a4 --- /dev/null +++ b/apps/web/components/profile/cards/index.ts @@ -0,0 +1,2 @@ +export * from './data-card'; +export * from './person-card'; diff --git a/apps/web/components/profile/person-card.tsx b/apps/web/components/profile/cards/person-card.tsx similarity index 95% rename from apps/web/components/profile/person-card.tsx rename to apps/web/components/profile/cards/person-card.tsx index 81cbd3c..edf2495 100644 --- a/apps/web/components/profile/person-card.tsx +++ b/apps/web/components/profile/cards/person-card.tsx @@ -1,5 +1,5 @@ 'use client'; -import { type ProfileProps } from './types'; +import { type ProfileProps } from '../types'; import { getProfile } from '@/actions/profile'; import { Avatar, AvatarFallback, AvatarImage } from '@repo/ui/components/ui/avatar'; import { Card } from '@repo/ui/components/ui/card'; diff --git a/apps/web/components/profile/checkbox-field.tsx b/apps/web/components/profile/fields/checkbox-field.tsx similarity index 100% rename from apps/web/components/profile/checkbox-field.tsx rename to apps/web/components/profile/fields/checkbox-field.tsx diff --git a/apps/web/components/profile/text-field.tsx b/apps/web/components/profile/fields/text-field.tsx similarity index 100% rename from apps/web/components/profile/text-field.tsx rename to apps/web/components/profile/fields/text-field.tsx diff --git a/apps/web/components/profile/index.ts b/apps/web/components/profile/index.ts index ddd60a4..870e357 100644 --- a/apps/web/components/profile/index.ts +++ b/apps/web/components/profile/index.ts @@ -1,2 +1 @@ -export * from './data-card'; -export * from './person-card'; +export * from './cards';