import { AnimatePresence, motion } from 'motion/react' import { AppletContainer } from '@/client/features/applets/applet-container' import { useWidget } from '@/client/features/applets/use-applet' import { useWorkspaceId } from '@/client/features/workspace/workspace-context' import { WidgetErrorBoundary } from './widget-error-boundary' 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} )} ) }