diff --git a/src/app/books/[bookId]/page.tsx b/src/app/books/[bookId]/page.tsx index 5b2fa4b..82608f9 100644 --- a/src/app/books/[bookId]/page.tsx +++ b/src/app/books/[bookId]/page.tsx @@ -1,8 +1,7 @@ -import { fetchBookById, fetchBookChapterLinks } from "@/lib/api"; +import { fetchBookById } from "@/lib/api"; import { Book } from "@/lib/types"; import { formatDateToMonthDayYear } from "@/lib/utils"; import ChapterDropdown from "@/components/ChapterDropdown"; -import Image from "next/image"; export type paramsType = Promise<{ bookId: string}>; @@ -32,8 +31,7 @@ export default async function BookPage(props: { params: paramsType }) { alt={cover_media?.alternativeText || `Cover of ${book.title}`} className="rounded-lg object-cover w-64 h-96" /> -
-

{title}

+

{title}

Join Our Patreon for Unreleased Chapters -

@@ -64,7 +61,7 @@ export default async function BookPage(props: { params: paramsType }) { Chapter {chapter.number}: {chapter.title}

- Release Date: {formatDateToMonthDayYear(new Date(chapter.release_date))} + Release Date: {formatDateToMonthDayYear(new Date(chapter.release_datetime))}

@@ -84,7 +81,7 @@ export default async function BookPage(props: { params: paramsType }) { Chapter {chapter.number}: {chapter.title}

- Release Date: {formatDateToMonthDayYear(new Date(chapter.release_date))} + Release Date: {formatDateToMonthDayYear(new Date(chapter.release_datetime))}

diff --git a/src/app/page.tsx b/src/app/page.tsx index f17d659..6f74971 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,6 +1,5 @@ import { Book } from "@/lib/types"; import { fetchBooks } from "@/lib/api"; -import Image from "next/image"; export default async function HomePage() { let books: Book[] = []; diff --git a/src/components/NavigationBar.tsx b/src/components/NavigationBar.tsx index a7a9af0..ac48688 100644 --- a/src/components/NavigationBar.tsx +++ b/src/components/NavigationBar.tsx @@ -27,7 +27,7 @@ export default function Navbar() { Book List - + Patreon @@ -60,7 +60,7 @@ export default function Navbar() { Book List - + Patreon diff --git a/src/components/NavigationButtons.tsx b/src/components/NavigationButtons.tsx index 5058a9c..962511c 100644 --- a/src/components/NavigationButtons.tsx +++ b/src/components/NavigationButtons.tsx @@ -11,12 +11,11 @@ interface NavigationButtonsProps { nextChapter: string; } -const NavigationButtons: React.FC = ({ bookId, documentId, prevChapter, nextChapter }) => { +const NavigationButtons: React.FC = ({ bookId, prevChapter, nextChapter }) => { const router = useRouter(); const navigateToChapter = (destinationId: string) => { router.push(`/books/${bookId}/chapters/${destinationId}`); }; - Ad.patreon const navigateToAllChapters = () => { router.push(`/books/${bookId}`); diff --git a/src/lib/api.tsx b/src/lib/api.tsx index de7640b..3829e55 100644 --- a/src/lib/api.tsx +++ b/src/lib/api.tsx @@ -32,7 +32,6 @@ export async function fetchFromAPI( throw new Error(errorData.message || `API fetch error (status: ${response.status})`); } const responseJson = await response.json(); - console.log(responseJson) return responseJson; } catch (error) { console.error("Fetch error:", error); diff --git a/src/lib/types.tsx b/src/lib/types.tsx index 91c9246..44f1486 100644 --- a/src/lib/types.tsx +++ b/src/lib/types.tsx @@ -5,7 +5,7 @@ export interface Chapter { number: number; title: string; editor?: Editor; - release_date: string; + release_datetime: string; content: string; book?: Book; } @@ -58,7 +58,7 @@ export interface Book { raw_author: string; cover: Media[] | null; description: string; - release_date: string; + release_datetime: string; chapters: Chapter[]; glossary: Glossary; } diff --git a/src/lib/utils.tsx b/src/lib/utils.tsx index 0115c4c..c5aa9d4 100644 --- a/src/lib/utils.tsx +++ b/src/lib/utils.tsx @@ -3,5 +3,8 @@ export function formatDateToMonthDayYear(date: Date): string { month: "long", day: "numeric", year: "numeric", + hour: "numeric", + minute: "numeric", + timeZoneName: "short", }); } \ No newline at end of file