From f3c53b333154aa53bcd4232d5d755204e2654f4c Mon Sep 17 00:00:00 2001 From: saravanakumardb1 Date: Thu, 19 Mar 2026 21:56:00 -0700 Subject: [PATCH] =?UTF-8?q?refactor(admin-web):=20remove=20dead=20local=20?= =?UTF-8?q?components=20=E2=80=94=20already=20using=20@bytelyst/dashboard-?= =?UTF-8?q?components?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed unused local copies that were superseded by shared package imports: - EmptyState.tsx (dead — no imports found) - LoadingSpinner.tsx (dead — no imports found) - PageHeader.tsx (dead — no imports found) Dashboard already consumes NotFoundPage from @bytelyst/dashboard-components. --- .../admin-web/src/components/EmptyState.tsx | 27 -------------- .../src/components/LoadingSpinner.tsx | 37 ------------------- .../admin-web/src/components/PageHeader.tsx | 34 ----------------- 3 files changed, 98 deletions(-) delete mode 100644 dashboards/admin-web/src/components/EmptyState.tsx delete mode 100644 dashboards/admin-web/src/components/LoadingSpinner.tsx delete mode 100644 dashboards/admin-web/src/components/PageHeader.tsx diff --git a/dashboards/admin-web/src/components/EmptyState.tsx b/dashboards/admin-web/src/components/EmptyState.tsx deleted file mode 100644 index 5de628e8..00000000 --- a/dashboards/admin-web/src/components/EmptyState.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import type { ReactNode } from 'react'; -import { Button } from './ui/button'; - -interface EmptyStateProps { - icon?: ReactNode; - title: string; - description: string; - action?: { - label: string; - onClick: () => void; - }; -} - -export function EmptyState({ icon, title, description, action }: EmptyStateProps): ReactNode { - return ( -
- {icon && ( -
- {icon} -
- )} -

{title}

-

{description}

- {action && } -
- ); -} diff --git a/dashboards/admin-web/src/components/LoadingSpinner.tsx b/dashboards/admin-web/src/components/LoadingSpinner.tsx deleted file mode 100644 index ce07cdd3..00000000 --- a/dashboards/admin-web/src/components/LoadingSpinner.tsx +++ /dev/null @@ -1,37 +0,0 @@ -interface LoadingSpinnerProps { - size?: 'sm' | 'md' | 'lg'; - className?: string; -} - -export function LoadingSpinner({ size = 'md', className = '' }: LoadingSpinnerProps) { - const sizeClasses = { - sm: 'w-4 h-4', - md: 'w-8 h-8', - lg: 'w-12 h-12', - }; - - return ( -
- - - - -
- ); -} diff --git a/dashboards/admin-web/src/components/PageHeader.tsx b/dashboards/admin-web/src/components/PageHeader.tsx deleted file mode 100644 index 2b6e1b80..00000000 --- a/dashboards/admin-web/src/components/PageHeader.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import type { ReactNode } from 'react'; - -interface PageHeaderProps { - title: string; - breadcrumbs?: Array<{ label: string; href?: string }>; - actions?: ReactNode; -} - -export function PageHeader({ title, breadcrumbs, actions }: PageHeaderProps): ReactNode { - return ( -
-
- {breadcrumbs && breadcrumbs.length > 0 && ( - - )} -

{title}

-
- {actions &&
{actions}
} -
- ); -}