Skip to content

Commit c15a358

Browse files
committed
Added new menu button and improved the code
1 parent 974aa9b commit c15a358

1 file changed

Lines changed: 56 additions & 3 deletions

File tree

src/pages/index.js

Lines changed: 56 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
FaArrowRight,
1010
FaChevronDown,
1111
FaChevronUp,
12+
FaCrown,
1213
} from "react-icons/fa";
1314
import { CiLocationArrow1 } from "react-icons/ci";
1415
import { Transition } from "@headlessui/react";
@@ -62,6 +63,30 @@ const Home = () => {
6263
setHoveredButton(null);
6364
};
6465

66+
const premiumButtonTexts = [
67+
"🌟 Upgrade to Premium!",
68+
"🚀 Go Premium Now!",
69+
"💎 Unlock Premium!",
70+
"🔥 Get Premium Access!",
71+
"🎉 Join Premium Today!",
72+
"🌟 Level Up with Premium!",
73+
"💖 Treat Yourself to Premium!",
74+
"🚀 Blast Off with Premium!",
75+
"🎁 Exclusive Perks Await!",
76+
"⭐ Access Premium Features",
77+
"💼 Upgrade More Benefits",
78+
"🔓 Unlock Exclusive Features",
79+
"🎯 Get Best Experience",
80+
];
81+
82+
const [premiumButtonText, setPremiumButtonText] = useState("");
83+
// Select a random button text on each render
84+
useEffect(() => {
85+
setPremiumButtonText(
86+
premiumButtonTexts[Math.floor(Math.random() * premiumButtonTexts.length)]
87+
);
88+
}, []);
89+
6590
return (
6691
<>
6792
<Head>
@@ -112,24 +137,36 @@ const Home = () => {
112137
)}
113138
</button>
114139
<div className="hidden lg:flex lg:items-center lg:space-x-6">
140+
<Link href="/" className="text-white hover:text-gray-300">
141+
Home
142+
</Link>
115143
<Link
144+
target="_blank"
116145
href="https://discord.gg/yyW389c"
117146
className="text-white hover:text-gray-300"
118147
>
119148
Support
120149
</Link>
121150
<Link
151+
target="_blank"
122152
href="https://ko-fi.com/Aeryk"
123153
className="text-white hover:text-gray-300"
124154
>
125155
Donate Us
126156
</Link>
127157
<Link
158+
target="_blank"
128159
href="https://github.com/WaifuAPI"
129160
className="text-white hover:text-gray-300"
130161
>
131162
GitHub
132163
</Link>
164+
<Link
165+
href="/premium"
166+
className="text-white font-medium px-4 py-2 rounded-md bg-gray-800 hover:bg-white hover:text-gray-900 transition duration-300 border border-gray-600"
167+
>
168+
<span className="text-lg">{premiumButtonText}</span>
169+
</Link>
133170
</div>
134171
</div>
135172
<Transition
@@ -147,6 +184,12 @@ const Home = () => {
147184
className="absolute w-full top-full left-0 lg:hidden bg-gray-900 z-50"
148185
>
149186
<div className="px-7 pt-2 pb-3 space-y-1">
187+
<Link
188+
href="/"
189+
className="block text-white mt-1 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-base font-medium"
190+
>
191+
Home
192+
</Link>
150193
<Link
151194
href="https://discord.gg/yyW389c"
152195
className="block text-white mt-1 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-base font-medium"
@@ -165,6 +208,13 @@ const Home = () => {
165208
>
166209
GitHub
167210
</Link>
211+
<Link
212+
href="/premium"
213+
className="inline-flex items-center gap-2 text-white font-semibold px-4 py-2 rounded-lg bg-gray-800 hover:bg-gray-600 transition duration-300"
214+
>
215+
{/* <span className="text-lg">💎 Unlock Premium!</span> */}
216+
<span className="text-lg">{premiumButtonText}</span>
217+
</Link>
168218
</div>
169219
</div>
170220
)}
@@ -331,21 +381,24 @@ const Home = () => {
331381
<footer className="bg-gray-900 py-4 px-12 lg:px-18 mt-auto">
332382
<div className="container mx-auto px-5 text-center lg:text-left -translate-y-2">
333383
<div className="flex flex-col space-y-4 lg:flex-row lg:items-center lg:justify-between">
334-
<div className="text-white">&copy; Waifu.it 2024</div>
384+
<div className="text-white">&copy; Waifu.it 2025</div>
335385
<div className="flex justify-center lg:justify-start space-x-4">
336386
<Link
387+
target="_blank"
337388
href="https://raw.githubusercontent.com/WaifuAPI/Waifu.it/production/PRIVACY_POLICY.md"
338389
className="text-gray-400 hover:text-white"
339390
>
340391
Privacy
341392
</Link>
342393
<Link
343-
href="https://raw.githubusercontent.com/WaifuAPI/Waifu.it/production/LICENCE.md"
394+
target="_blank"
395+
href="https://docs.waifu.it/tos"
344396
className="text-gray-400 hover:text-white"
345397
>
346-
Terms
398+
Terms of Service
347399
</Link>
348400
<Link
401+
target="_blank"
349402
href="https://ko-fi.com/Aeryk"
350403
className="text-gray-400 hover:text-white"
351404
>

0 commit comments

Comments
 (0)