import { AnimatePresence, motion } from 'motion/react' import { AppletMount } from '@/client/features/applets/AppletMount' import { useWidget } from '@/client/features/applets/useApplet' import { useWorkspaceId } from '@/client/features/workspace/WorkspaceContext' import { WidgetErrorBoundary } from './WidgetErrorBoundary' type WidgetShellProps = { name: string } export function WidgetShell({ name }: WidgetShellProps) { const workspaceId = useWorkspaceId() const widget = useWidget(name) return ( {widget.status === 'ready' && ( )} {widget.status === 'error' && ( {widget.error} )} ) }