diff --git a/apps/web/src/components/SortableGroup.tsx b/apps/web/src/components/SortableGroup.tsx index c0dd3d7..97ece43 100644 --- a/apps/web/src/components/SortableGroup.tsx +++ b/apps/web/src/components/SortableGroup.tsx @@ -4,6 +4,7 @@ */ import { useSortable } from "@dnd-kit/sortable"; import { CSS } from "@dnd-kit/utilities"; +import { useLingui } from "@lingui/react/macro"; import { createContext, memo, useContext, useMemo } from "react"; interface SortableGroupProps { @@ -30,13 +31,14 @@ export const ProjectDragGrip = memo(function ProjectDragGrip({ className?: string; children: React.ReactNode; }) { + const { t } = useLingui(); const handle = useSortableGroupHandle(); return ( - - setShowCreateBotModal(false)} - onCreate={async (input) => { - await createBot(input); - }} - onImport={async (manifest) => { - await importBot(manifest); - setShowCreateBotModal(false); - }} - /> - - , - document.body, - )} {panel === "settings" && active ? ( ) : null} + {/* Centered Create Bot Modal */} + {showCreateBotModal && + createPortal( +
+ +
+ setShowCreateBotModal(false)} + onCreate={async (input) => { + await createBot(input); + }} + onImport={async (manifest) => { + await importBot(manifest); + setShowCreateBotModal(false); + }} + /> + + , + document.body, + )} {contextChat && botMenu ? ( diff --git a/apps/web/src/pages/shell/use-sidebar-model.ts b/apps/web/src/pages/shell/use-sidebar-model.ts index d1f864c..847506f 100644 --- a/apps/web/src/pages/shell/use-sidebar-model.ts +++ b/apps/web/src/pages/shell/use-sidebar-model.ts @@ -32,7 +32,6 @@ export function useSidebarModel({ setProjectOrder(orderedIds); writeProjectSidebarOrder(orderedIds); }, []); - const [draggedProjectId, setDraggedProjectId] = useState(null); const sensors = useSensors( useSensor(MouseSensor, { activationConstraint: { distance: 8 } }), useSensor(TouchSensor, { activationConstraint: { distance: 8 } }), @@ -242,9 +241,6 @@ export function useSidebarModel({ }, [projectSidebarGroups, handleReorderProjects], ); - const handleProjectDragStart = useCallback((event: { active: { id: string | number } }) => { - setDraggedProjectId(String(event.active.id)); - }, []); return { homeSpaceBots, @@ -252,8 +248,6 @@ export function useSidebarModel({ mainConversationEntry, projectSidebarGroups, sensors, - setDraggedProjectId, handleProjectDragEnd, - handleProjectDragStart, }; }