Skip to content

Commit ff054ed

Browse files
committed
add atp pages to navbar and footer and home page
1 parent 194b3d8 commit ff054ed

File tree

3 files changed

+31
-5
lines changed

3 files changed

+31
-5
lines changed

components/footer.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export function Footer() {
6767
<ul className="space-y-1 sm:space-y-2">
6868
{[
6969
{ name: "Products Overview", icon: Package, url: "/products" },
70+
{ name: "ATP", icon: DollarSign, url: "/atp" },
7071
{ name: "Simulations", icon: Network, url: "/simulations" },
7172
{ name: "Mobile App", icon: Smartphone, url: "/mobile" },
7273
{ name: "Swarms Python", icon: Github, url: "https://github.com/kyegomez/swarms" },

components/home-products.tsx

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { motion, useScroll, useTransform } from "framer-motion"
66
import { ExternalLink } from "lucide-react"
77
import { useRef } from "react"
88
import Image from "next/image"
9+
import Link from "next/link"
910

1011
const swarmsStack = [
1112
{
@@ -95,7 +96,7 @@ async fn main() -> Result<()> {
9596
subtitle: "On-Chain Payment Settlement for AI Agents",
9697
description:
9798
"A Solana-based payment settlement system that automatically parses usage, executes split payments, and encrypts agent responses until payment is confirmed on-chain.",
98-
link: "https://docs.swarms.ai/docs/atp/overview",
99+
link: "/atp",
99100
docsLink: "https://docs.swarms.ai/docs/atp/overview",
100101
code: `from fastapi import FastAPI
101102
from atp.middleware import ATPSettlementMiddleware
@@ -306,10 +307,17 @@ function ProductSection({ product, index, isEven }: { product: typeof swarmsStac
306307
className="bg-gradient-to-r from-red-900 via-red-800 to-red-900 text-white hover:from-red-800 hover:via-red-700 hover:to-red-800 font-bold w-full sm:w-auto transition-all duration-300 hover:scale-105 hover:shadow-lg hover:shadow-red-900/50 group border-0 text-xs sm:text-sm md:text-base px-3 sm:px-4 md:px-6 py-4 sm:py-5 md:py-6 flex-shrink-0"
307308
asChild
308309
>
309-
<a href={product.link} target="_blank" rel="noopener noreferrer" className="flex items-center justify-center">
310-
<span>Get Started</span>
311-
<ExternalLink className="h-3 w-3 sm:h-4 sm:w-4 ml-2 transition-transform duration-300 group-hover:translate-x-1 group-hover:-translate-y-1 flex-shrink-0" />
312-
</a>
310+
{product.link.startsWith("/") ? (
311+
<Link href={product.link} className="flex items-center justify-center">
312+
<span>Get Started</span>
313+
<ExternalLink className="h-3 w-3 sm:h-4 sm:w-4 ml-2 transition-transform duration-300 group-hover:translate-x-1 group-hover:-translate-y-1 flex-shrink-0" />
314+
</Link>
315+
) : (
316+
<a href={product.link} target="_blank" rel="noopener noreferrer" className="flex items-center justify-center">
317+
<span>Get Started</span>
318+
<ExternalLink className="h-3 w-3 sm:h-4 sm:w-4 ml-2 transition-transform duration-300 group-hover:translate-x-1 group-hover:-translate-y-1 flex-shrink-0" />
319+
</a>
320+
)}
313321
</Button>
314322
<Button
315323
variant="outline"

components/navigation.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,15 @@ export function Navigation() {
218218
<p className="text-xs text-neutral-400 mt-0.5">Explore all products</p>
219219
</div>
220220
</Link>
221+
<Link href="/atp" className="group flex cursor-pointer items-center rounded-xl hover:bg-white/[0.05] transition-all duration-200 p-3 relative">
222+
<div className="mr-3 h-9 w-9 flex items-center justify-center rounded-lg bg-neutral-800/50 border border-neutral-700/30 group-hover:border-red-500/40 transition-all duration-200">
223+
<DollarSign className="h-4 w-4 text-red-500" />
224+
</div>
225+
<div className="flex-1 min-w-0">
226+
<span className="text-sm font-semibold text-white block">ATP</span>
227+
<p className="text-xs text-neutral-400 mt-0.5">Agent Trade Protocol</p>
228+
</div>
229+
</Link>
221230
<Link href="/simulations" className="group flex cursor-pointer items-center rounded-xl hover:bg-white/[0.05] transition-all duration-200 p-3 relative">
222231
<div className="mr-3 h-9 w-9 flex items-center justify-center rounded-lg bg-neutral-800/50 border border-neutral-700/30 group-hover:border-red-500/40 transition-all duration-200">
223232
<Network className="h-4 w-4 text-red-500" />
@@ -664,6 +673,14 @@ export function Navigation() {
664673
<Package className="mr-3 h-4 w-4 text-white/60 flex-shrink-0" />
665674
Products Overview
666675
</Link>
676+
<Link
677+
href="/atp"
678+
className="text-sm font-semibold text-white/85 hover:text-white transition-all duration-300 hover:bg-white/[0.05] p-3 rounded-lg flex items-center border border-transparent hover:border-white/10"
679+
onClick={() => setIsOpen(false)}
680+
>
681+
<DollarSign className="mr-3 h-4 w-4 text-white/60 flex-shrink-0" />
682+
ATP
683+
</Link>
667684
<Link
668685
href="/simulations"
669686
className="text-sm font-semibold text-white/85 hover:text-white transition-all duration-300 hover:bg-white/[0.05] p-3 rounded-lg flex items-center border border-transparent hover:border-white/10"

0 commit comments

Comments
 (0)