Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

770 B
Raw Blame
'use client';

import { Center } from '@lobehub/ui';
import type { ComponentType } from 'react';
import { memo } from 'react';

interface EmptyStateProps {
  /** When false, rendered by the page-level input box; only a placeholder is displayed here */
  embedInput?: boolean;
  /** Prompt input component to show when embedInput is true */
  PromptInput: ComponentType<{ disableAnimation?: boolean; showTitle?: boolean }>;
}

const EmptyState = memo<EmptyStateProps>(({ embedInput = true, PromptInput }) => {
  if (!embedInput) {
    return <Center flex={1} />;
  }
  return (
    <Center height={'calc(100vh - 180px)'}>
      <PromptInput showTitle={true} />
    </Center>
  );
});

EmptyState.displayName = 'GenerationWorkspaceEmptyState';

export default EmptyState;