diff --git a/components/Announcement.tsx b/components/Announcement.tsx index b803f34..542eede 100644 --- a/components/Announcement.tsx +++ b/components/Announcement.tsx @@ -1,6 +1,6 @@ "use client"; +import { useState } from "react"; import { RxCross2 } from "react-icons/rx"; -import React, { useState } from "react"; async function getCurrentVersion() { @@ -9,27 +9,26 @@ async function getCurrentVersion() { ); const data = await response.json(); return data.tag_name; - // https://github.com/PriyansuMaurya/AI-Fusion/releases/tag/v1.2.4-beta + // return v1.2.4-beta } export default function Announcement() { const [announcement, setAnnouncement] = useState(true); - const announcements = [ -
Check what has changed in the {getCurrentVersion()}
, -
⭐️ If you like AI Fusion, give it a star on GitHub
- ] - - const getAnnouncement = () => { - let randomIndex = Math.floor(Math.random() * announcements.length); - return announcements[randomIndex] - } + return ( announcement &&
-
-
{getAnnouncement()} +
+
{ + [ + <>Check what has changed in the {getCurrentVersion()}, + <>⭐️ If you like AI Fusion, give it a star on GitHub + ][Math.floor(Math.random() * 2)] + }
+ {/*
*/} +