import { Dialog, Transition } from "@headlessui/react";
import Link from "next/link";
import { Fragment, useEffect, useRef, useState } from "react";
const web = {
version: "v4.3.1",
};
const logs = [
{
version: "v4.3.1",
pre: true,
notes: null,
highlights: true,
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 (
<>
{version} {pre && ( pre )}
*{notes}
)} {children}