Skip to content

Commit

Permalink
feat: remove useless portal
Browse files Browse the repository at this point in the history
  • Loading branch information
bepyan committed Jul 26, 2024
1 parent e4e3197 commit c9bc877
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/components/editor/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
"use client";

import { createPortal } from "react-dom";
import EditorMain from "~/components/editor/main";
import EditorNavigation from "~/components/editor/navigation";
import EditorProvider, {
Expand All @@ -9,7 +6,7 @@ import EditorProvider, {
import EditorSidebar from "~/components/editor/sidebar";

export default function Editor(props: EditorProviderProps) {
return createPortal(
return (
<EditorProvider {...props}>
<div className="fixed bottom-0 left-0 right-0 top-0 z-[20] flex flex-col overflow-hidden bg-secondary">
<EditorNavigation />
Expand All @@ -18,7 +15,6 @@ export default function Editor(props: EditorProviderProps) {
</div>
<EditorSidebar />
</div>
</EditorProvider>,
document.body,
</EditorProvider>
);
}

0 comments on commit c9bc877

Please sign in to comment.