Skip to content

Commit 838f425

Browse files
Merge pull request #22 from KanishkSogani/ui-update
update navbar and buttons text
2 parents 26b754d + 352840d commit 838f425

File tree

3 files changed

+20
-58
lines changed

3 files changed

+20
-58
lines changed

web/src/components/LandingPage/cta-section.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function CtaSection() {
3030
size="lg"
3131
className="bg-gradient-to-r from-purple-600 to-amber-500 hover:from-purple-700 hover:to-amber-600 text-white shadow-lg shadow-purple-700/20 group w-full md:w-auto"
3232
>
33-
<span>Get Started</span>
33+
<span>Create TNT</span>
3434
<ArrowRight className="ml-2 h-4 w-4 transition-transform group-hover:translate-x-1" />
3535
</Button>
3636
</Link>

web/src/components/LandingPage/hero-section.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export function HeroSection() {
6666
size="lg"
6767
className="w-full bg-gradient-to-r from-purple-600 to-amber-500 hover:from-purple-700 hover:to-amber-600 text-white shadow-lg shadow-purple-700/20"
6868
>
69-
Get Started
69+
Create TNT
7070
</Button>
7171
</Link>
7272
<Button

web/src/components/Navbar.tsx

Lines changed: 18 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,12 @@ import { cn } from "@/lib/utils";
66
import { Menu, X } from "lucide-react";
77
import Image from "next/image";
88
import { ConnectButton } from "@rainbow-me/rainbowkit";
9-
import { usePathname } from "next/navigation";
109
import Link from "next/link";
1110
interface NavLink {
1211
name: string;
1312
href: string;
1413
}
1514

16-
const landingPageLinks: NavLink[] = [
17-
{ name: "Home", href: "#hero" },
18-
{ name: "How It Works", href: "#how-it-works" },
19-
{ name: "Features", href: "#features" },
20-
{ name: "Get Started", href: "#cta" },
21-
];
22-
2315
const appLinks = [
2416
{ name: "Create", href: "/create" },
2517
{ name: "My TNTs", href: "/my-tnts" },
@@ -29,8 +21,6 @@ const appLinks = [
2921
export function Navbar() {
3022
const [isScrolled, setIsScrolled] = useState(false);
3123
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
32-
const pathname = usePathname();
33-
const isLandingPage = pathname === "/";
3424

3525
useEffect(() => {
3626
const handleScroll = () => {
@@ -41,14 +31,6 @@ export function Navbar() {
4131
return () => window.removeEventListener("scroll", handleScroll);
4232
}, []);
4333

44-
const scrollToSection = (href: string) => {
45-
setIsMobileMenuOpen(false);
46-
const element = document.querySelector(href);
47-
if (element) {
48-
element.scrollIntoView({ behavior: "smooth" });
49-
}
50-
};
51-
5234
return (
5335
<header
5436
className={cn(
@@ -70,25 +52,15 @@ export function Navbar() {
7052

7153
{/* Desktop Navigation */}
7254
<nav className="hidden md:flex items-center space-x-8">
73-
{isLandingPage
74-
? landingPageLinks.map((link) => (
75-
<button
76-
key={link.name}
77-
onClick={() => scrollToSection(link.href)}
78-
className="text-slate-300 hover:text-white transition-colors duration-200"
79-
>
80-
{link.name}
81-
</button>
82-
))
83-
: appLinks.map((link) => (
84-
<Link
85-
key={link.name}
86-
href={link.href}
87-
className="text-slate-300 hover:text-white transition-colors duration-200"
88-
>
89-
{link.name}
90-
</Link>
91-
))}
55+
{appLinks.map((link) => (
56+
<Link
57+
key={link.name}
58+
href={link.href}
59+
className="text-slate-300 hover:text-white transition-colors duration-200"
60+
>
61+
{link.name}
62+
</Link>
63+
))}
9264
<ConnectButton />
9365
</nav>
9466

@@ -105,25 +77,15 @@ export function Navbar() {
10577
{isMobileMenuOpen && (
10678
<div className="md:hidden absolute top-full left-0 right-0 bg-black/95 backdrop-blur-md border-b border-slate-800/50 shadow-lg py-4">
10779
<nav className="flex flex-col items-center space-y-4 px-4">
108-
{isLandingPage
109-
? landingPageLinks.map((link) => (
110-
<button
111-
key={link.name}
112-
onClick={() => scrollToSection(link.href)}
113-
className="text-slate-300 hover:text-white transition-colors duration-200 py-2"
114-
>
115-
{link.name}
116-
</button>
117-
))
118-
: appLinks.map((link) => (
119-
<Link
120-
key={link.name}
121-
href={link.href}
122-
className="text-slate-300 hover:text-white transition-colors duration-200 py-2"
123-
>
124-
{link.name}
125-
</Link>
126-
))}
80+
{appLinks.map((link) => (
81+
<Link
82+
key={link.name}
83+
href={link.href}
84+
className="text-slate-300 hover:text-white transition-colors duration-200 py-2"
85+
>
86+
{link.name}
87+
</Link>
88+
))}
12789
<div className="w-full flex justify-center">
12890
<ConnectButton />
12991
</div>

0 commit comments

Comments
 (0)