Skip to content

⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.

fix build errors

daniel31x13181e1009e510
diff --git a/components/Preservation/Preservation.tsx b/components/Preservation/Preservation.tsx
index a9dd5ece..00423bde 100644
--- a/components/Preservation/Preservation.tsx
+++ b/components/Preservation/Preservation.tsx
@@ -243,8 +243,6 @@ const RenderFormat = ({
containerRef: React.RefObject<HTMLDivElement>;
setIsExpanded: (expanded: boolean) => void;
}) => {
- if (!link?.id) return <></>;
-
const [containerRect, setContainerRect] = useState<DOMRect | null>(null);
const [delayPassed, setDelayPassed] = useState(false); // to get the content in place before animating
@@ -305,6 +303,8 @@ const RenderFormat = ({
: "none",
};
+ if (!link?.id) return <></>;
+
return ReactDOM.createPortal(
<div
style={style}
diff --git a/components/TextEditor.tsx b/components/TextEditor.tsx
index f4d6681f..5d965590 100644
--- a/components/TextEditor.tsx
+++ b/components/TextEditor.tsx
@@ -90,9 +90,6 @@ const TextEditor = forwardRef<TextEditorRef, Props>(
const router = useRouter();
const isPublicRoute = router.pathname.startsWith("/public");
- const permissions = link
- ? usePermissions(link.collection?.id as number)
- : true;
useEffect(() => {
const fetchLinkContent = async (
@@ -130,4 +127,6 @@ const TextEditor = forwardRef<TextEditorRef, Props>(
}
);
+TextEditor.displayName = "TextEditor";
+
export default TextEditor;