import { Icon } from '@lobehub/ui'; import { Progress, Typography } from 'antd'; import { useTheme } from 'antd-style'; import { Loader2 } from 'lucide-react'; import { ReactNode, memo } from 'react'; import { Center, Flexbox } from 'react-layout-kit'; export interface StageObjectItem { icon?: ReactNode; text: string; } export type StageItem = string | StageObjectItem; interface InitingProps { activeStage: number; stages: StageItem[]; } const InitProgress = memo(({ activeStage, stages }) => { const theme = useTheme(); const outStage = stages[activeStage]; const percent = (activeStage / (stages.length - 1)) * 100; const stage = typeof outStage === 'string' ? { text: outStage } : outStage; return (
{stage?.icon ? stage?.icon : } {stage?.text}
); }); export default InitProgress;