diff --git a/components/LinkCard.tsx b/components/LinkCard.tsx
index f12fcb5..62a6cfb 100644
--- a/components/LinkCard.tsx
+++ b/components/LinkCard.tsx
@@ -236,7 +236,7 @@ export default function LinkCard({ link, count, className }: Props) {
{count + 1}
- {unescapeString(link.name || link.description) || shortendURL}
+ {unescapeString(link.name || link.description) || link.url}
diff --git a/scripts/lib/urlHandler.ts b/scripts/lib/urlHandler.ts
index 6843805..c9bdd85 100644
--- a/scripts/lib/urlHandler.ts
+++ b/scripts/lib/urlHandler.ts
@@ -43,11 +43,9 @@ export default async function urlHandler(link: LinksAndCollectionAndOwner) {
// TODO
// const session = await page.context().newCDPSession(page);
-
// const doc = await session.send("Page.captureSnapshot", {
// format: "mhtml",
// });
-
// const saveDocLocally = (doc: any) => {
// console.log(doc);
// return createFile({
@@ -55,7 +53,6 @@ export default async function urlHandler(link: LinksAndCollectionAndOwner) {
// filePath: `archives/${targetLink.collectionId}/${link.id}.mhtml`,
// });
// };
-
// saveDocLocally(doc.data);
// Readability
diff --git a/scripts/worker.ts b/scripts/worker.ts
index 025be51..cba684c 100644
--- a/scripts/worker.ts
+++ b/scripts/worker.ts
@@ -99,7 +99,7 @@ async function processBatch() {
await Promise.allSettled(processingPromises);
}
-const intervalInMinutes = Number(process.env.ARCHIVE_SCRIPT_INTERVAL) || 10;
+const intervalInSeconds = Number(process.env.ARCHIVE_SCRIPT_INTERVAL) || 10;
function delay(sec: number) {
return new Promise((resolve) => setTimeout(resolve, sec * 1000));
@@ -110,10 +110,10 @@ async function init() {
while (true) {
try {
await processBatch();
- await delay(intervalInMinutes);
+ await delay(intervalInSeconds);
} catch (error) {
console.error("\x1b[34m%s\x1b[0m", "Error processing links:", error);
- await delay(intervalInMinutes);
+ await delay(intervalInSeconds);
}
}
}