import { Dialog, Transition } from "@headlessui/react"; import Link from "next/link"; import { Fragment, useEffect, useRef, useState } from "react"; const web = { version: "v4.4.0", }; const logs = [ { version: "v4.4.0", pre: false, notes: null, highlights: true, changes: [ "Added rate modal when user finished watching the whole series", "Fix: only half of the episodes has episodes thumbnail", "Fix: pressing back button in anime info page redirects user to the wrong page", "Progressively migrate codebase to typescript", ], }, // { // version: "v4.3.1", // pre: true, // notes: null, // highlights: false, // changes: [ // "Fix: Auto Next Episode forcing to play sub even if dub is selected", // "Fix: Episode metadata not showing after switching to dub", // "Fix: Profile picture weirdly cropped", // "Fix: Weird padding on the navbar in profile page", // ], // }, // { // version: "v4.3.0", // pre: true, // notes: null, // highlights: false, // changes: [ // "Added changelogs section", // "Added recommendations based on user lists", // "New Player!", // "And other minor bug fixes!", // ], // }, ]; export default function ChangeLogs() { let [isOpen, setIsOpen] = useState(false); let completeButtonRef = useRef(null); function closeModal() { localStorage.setItem("version", web.version); setIsOpen(false); } function getVersion() { let version = localStorage.getItem("version"); if (version !== web.version) { setIsOpen(true); } } useEffect(() => { getVersion(); }, []); return ( <>

Changelogs

{/* Github Icon */} {/* Discord Icon */}

Hi! Welcome to the new changelogs section. Here you can see a lists of the latest changes and updates to the site.

{/*

*This update is still in it's pre-release state, please expect to see some bugs. If you find any, please report them.

*/}
{logs.map((x) => ( {x.changes.map((i, index) => (

- {i}

))}
))}

see more changelogs{" "} here

); } type ChangelogsVersionsProps = { version?: string; pre: boolean; notes?: string | null; highlights?: boolean; children: React.ReactNode; }; export function ChangelogsVersions({ version, pre, notes, highlights, children, }: ChangelogsVersionsProps) { return ( <>

{version} {pre && ( pre )}

{notes && (

*{notes}

)} {children}
); }