diff --git a/apps/web/src/components/editor/action-bar.tsx b/apps/web/src/components/editor/action-bar.tsx
index 36d4058ac..f586991f7 100644
--- a/apps/web/src/components/editor/action-bar.tsx
+++ b/apps/web/src/components/editor/action-bar.tsx
@@ -220,21 +220,18 @@ function TabStrip() {
}}
onMove={(from, to) => {
if (from === to) return;
-
useEditorStore.setState((state) => {
- const direction =
- to === 0 ? "start" : from > to ? "left" : "right";
+ // if the tab where this tab is being dropped is pinned,
+ // let's pin our tab too.
+ if (state.sessions[to].pinned)
+ state.sessions[from].pinned = true;
+
const [fromTab] = state.sessions.splice(from, 1);
- const newIndex =
- direction === "start" || direction === "right" ? to : to - 1;
// unpin the tab if it is moved.
if (fromTab.pinned) fromTab.pinned = false;
- // if the tab where this tab is being dropped is pinned,
- // let's pin our tab too.
- if (state.sessions[to].pinned) fromTab.pinned = true;
- state.sessions.splice(newIndex, 0, fromTab);
+ state.sessions.splice(to, 0, fromTab);
});
}}
onClose={() => useEditorStore.getState().closeSessions(session.id)}
diff --git a/apps/web/src/components/error-boundary/index.tsx b/apps/web/src/components/error-boundary/index.tsx
index 3e8db053e..26c312fdd 100644
--- a/apps/web/src/components/error-boundary/index.tsx
+++ b/apps/web/src/components/error-boundary/index.tsx
@@ -84,19 +84,25 @@ export function ErrorComponent({ error, resetErrorBoundary }: FallbackProps) {
How to fix it?
{help.action}
-
-
+ >
+ ) : null}
+
+ {help ? (
+
+ ) : (
+ <>
+ {" "}
-
- >
- ) : (
- <>
-
- >
- )}
+ >
+ )}
+
);