Skip to content

Commit 47fdd4f

Browse files
committed
Refactor: hardcoded the premium button text for navbar and premium navbar
1 parent f8209a2 commit 47fdd4f

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

src/components/navbar/Main.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,6 @@ import { useState, useRef, useEffect } from "react";
33
import { FaChevronUp, FaChevronDown } from "react-icons/fa";
44
import { Transition } from "@headlessui/react";
55

6-
const premiumButtonTexts = [
7-
"🌟 Upgrade to Premium!",
8-
"🚀 Go Premium Now!",
9-
"💎 Unlock Premium!",
10-
"🔥 Get Premium Access!",
11-
"🎉 Join Premium Today!",
12-
"🌟 Level Up with Premium!",
13-
"💖 Treat Yourself to Premium!",
14-
"🚀 Blast Off with Premium!",
15-
"🎁 Exclusive Perks Await!",
16-
"⭐ Access Premium Features",
17-
"💼 Upgrade More Benefits",
18-
"🔓 Unlock Exclusive Features",
19-
"🎯 Get Best Experience",
20-
];
21-
226
export default function Navbar() {
237
const [premiumButtonText, setPremiumButtonText] = useState("");
248
const [isOpen, setIsOpen] = useState(false);
@@ -28,6 +12,22 @@ export default function Navbar() {
2812
setIsOpen(!isOpen);
2913
};
3014

15+
const premiumButtonTexts = [
16+
"🌟 Upgrade to Premium!",
17+
"🚀 Go Premium Now!",
18+
"💎 Unlock Premium!",
19+
"🔥 Get Premium Access!",
20+
"🎉 Join Premium Today!",
21+
"🌟 Level Up with Premium!",
22+
"💖 Treat Yourself to Premium!",
23+
"🚀 Blast Off with Premium!",
24+
"🎁 Exclusive Perks Await!",
25+
"⭐ Access Premium Features",
26+
"💼 Upgrade More Benefits",
27+
"🔓 Unlock Exclusive Features",
28+
"🎯 Get Best Experience",
29+
];
30+
3131
// Select a random button text on each render
3232
useEffect(() => {
3333
setPremiumButtonText(
@@ -77,7 +77,7 @@ export default function Navbar() {
7777
href="/premium"
7878
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"
7979
>
80-
<span className="text-lg">{premiumButtonText}</span>
80+
<span className="text-lg">🎁 Upgrade to Premium!</span>
8181
</Link>
8282
</div>
8383
</div>

src/components/navbar/Premium.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ export default function PremiumNavbar() {
146146
href="/premium"
147147
className="text-gray-900 font-medium px-4 py-2 rounded-md bg-white border border-gray-600 transition duration-300 hover:bg-gray-800 hover:text-white"
148148
>
149-
{/* <span className="text-lg">💎 Unlock Premium!</span> */}
150-
<span className="text-lg">{premiumButtonText}</span>
149+
<span className="text-lg">💎 Unlock Premium!</span>
150+
{/* <span className="text-lg">{premiumButtonText}</span> */}
151151
</Link>
152152
</div>
153153
</div>

0 commit comments

Comments
 (0)