Skip to content

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

small change

daniel31x13eecfb112e3d3
diff --git a/components/PortalWrapper.tsx b/components/PortalWrapper.tsx
deleted file mode 100644
index 1ef6969a..00000000
--- a/components/PortalWrapper.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-import ReactDOM from "react-dom";
-
-function PortalWrapper({
- children,
- usePortal,
-}: {
- children: React.ReactNode;
- usePortal: boolean;
-}) {
- if (!usePortal) {
- return <>{children}</>;
- }
-
- return ReactDOM.createPortal(children, document.body);
-}
-
-export default PortalWrapper;
diff --git a/components/Preservation.tsx b/components/Preservation.tsx
index aa5a8f11..8bc4063b 100644
--- a/components/Preservation.tsx
+++ b/components/Preservation.tsx
@@ -353,9 +353,7 @@ const RenderFormat = ({
<>
{!monolithLoaded && <PreservationSkeleton />}
<iframe
- src={`/api/v1/archives/${link.id}?format=${
- ArchivedFormat.monolith
- }&_=${Date.now()}`}
+ src={`/api/v1/archives/${link.id}?format=${ArchivedFormat.monolith}&_=${link.updatedAt}`}
className={clsx(
"w-full border-none",
monolithLoaded ? "block" : "hidden",
@@ -370,9 +368,7 @@ const RenderFormat = ({
<>
{!pdfLoaded && <PreservationSkeleton />}
<iframe
- src={`/api/v1/archives/${link.id}?format=${
- ArchivedFormat.pdf
- }&_=${Date.now()}`}
+ src={`/api/v1/archives/${link.id}?format=${ArchivedFormat.pdf}&_=${link.updatedAt}`}
className={clsx(
"w-full border-none",
pdfLoaded ? "block" : "hidden",
@@ -390,7 +386,7 @@ const RenderFormat = ({
<div className="overflow-auto w-fit mx-auto h-full">
<img
alt=""
- src={`/api/v1/archives/${link.id}?format=${format}`}
+ src={`/api/v1/archives/${link.id}?format=${format}&_=${link.updatedAt}`}
className={clsx("w-fit mx-auto", !imageLoaded && "hidden")}
onLoad={() => setImageLoaded(true)}
/>
diff --git a/components/ReadableView.tsx b/components/ReadableView.tsx
index 26fd267d..63f2e746 100644
--- a/components/ReadableView.tsx
+++ b/components/ReadableView.tsx
@@ -72,9 +72,7 @@ export default function ReadableView({ link, isExpanded, standalone }: Props) {
const fetchLinkContent = async () => {
if (formatAvailable(link, "readable")) {
const response = await fetch(
- `/api/v1/archives/${link?.id}?format=${
- ArchivedFormat.readability
- }&_=${Date.now()}`
+ `/api/v1/archives/${link?.id}?format=${ArchivedFormat.readability}&_=${link.updatedAt}`
);
const data = await response?.json();
setLinkContent(data?.content || "");