updated route + bug fixed

This commit is contained in:
daniel31x13
2023-11-19 16:22:27 -05:00
parent bd16136946
commit 0c6911aaf0
13 changed files with 98 additions and 103 deletions
+7 -2
View File
@@ -3,7 +3,10 @@ import React, { useEffect, useState } from "react";
import Link from "next/link";
import useLinkStore from "@/store/links";
import { useRouter } from "next/router";
import { LinkIncludingShortenedCollectionAndTags } from "@/types/global";
import {
ArchivedFormat,
LinkIncludingShortenedCollectionAndTags,
} from "@/types/global";
import Image from "next/image";
import ColorThief, { RGBColor } from "colorthief";
import { useTheme } from "next-themes";
@@ -64,7 +67,9 @@ export default function Index() {
link?.readabilityPath &&
link?.readabilityPath !== "pending"
) {
const response = await fetch(`/api/v1/${link?.readabilityPath}`);
const response = await fetch(
`/api/v1/archives/${link?.id}?format=${ArchivedFormat.readability}`
);
const data = await response?.json();