Files
openchamber/packages/ui/src/components/chat/ChatEmptyState.tsx
T

30 lines
1.2 KiB
TypeScript
Raw Normal View History

2025-12-07 19:32:53 +02:00
import React from 'react';
import { OpenChamberLogo } from '@/components/ui/OpenChamberLogo';
import { useThemeSystem } from '@/contexts/useThemeSystem';
import { useGlobalSyncStore } from '@/sync/global-sync-store';
2025-12-21 22:59:06 +02:00
const ChatEmptyState: React.FC = () => {
const { currentTheme } = useThemeSystem();
const initError = useGlobalSyncStore((s) => s.error);
2025-12-21 22:59:06 +02:00
const textColor = currentTheme?.colors?.surface?.mutedForeground || 'var(--muted-foreground)';
2025-12-21 22:59:06 +02:00
2025-12-07 19:32:53 +02:00
return (
2025-12-21 22:59:06 +02:00
<div className="flex flex-col items-center justify-center min-h-full w-full gap-6">
<OpenChamberLogo width={140} height={140} className="opacity-20" />
{initError ? (
<div className="flex flex-col items-center gap-2 max-w-md text-center px-4">
<span className="text-body-md font-medium text-destructive">OpenCode is not reachable</span>
<span className="text-body-sm" style={{ color: textColor }}>
{initError.message}
</span>
</div>
) : (
<span className="text-body-md" style={{ color: textColor }}>Start a new chat</span>
)}
2025-12-07 19:32:53 +02:00
</div>
);
};
export default React.memo(ChatEmptyState);