Skip to content

Commit

Permalink
feat: add download link for SDK in footer and header components
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafacv23 committed Feb 10, 2025
1 parent 4a50597 commit bbe495c
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 3 deletions.
7 changes: 6 additions & 1 deletion components/footer/footerData.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FaGithub, FaLinkedin } from "react-icons/fa"
import { FaGithub, FaLinkedin, FaDownload } from "react-icons/fa"
import { MdOutlineWebAsset } from "react-icons/md"
import { SiKofi } from "react-icons/si"

Expand Down Expand Up @@ -28,6 +28,11 @@ const contactLinks: ContactLink[] = [
title: "Rafa Canosa Github",
icon: FaGithub,
},
{
href: "https://www.npmjs.com/package/@f1api/sdk",
title: "Download the SDK from NPM",
icon: FaDownload,
},
{
href: "https://ninjapath.vercel.app/portfolio",
title: "Rafa Canosa Portfolio",
Expand Down
12 changes: 11 additions & 1 deletion components/header/DesktopHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client"

import { Github } from "lucide-react"
import { Download, Github } from "lucide-react"
import { Button, buttonVariants } from "@/components/ui/button"
import {
CommandDialog,
Expand Down Expand Up @@ -80,10 +80,20 @@ export default function DesktopHeader() {
href={"https://github.com/rafacv23/f1-api"}
target="_blank"
rel="noreferrer"
title="View the source code on GitHub"
className={buttonVariants({ variant: "outline" })}
>
<Github />
</Link>
<Link
href={"https://www.npmjs.com/package/@f1api/sdk"}
target="_blank"
rel="noreferrer"
title="Download the SDK from NPM"
className={buttonVariants({ variant: "outline" })}
>
<Download />
</Link>
</div>
)
}
26 changes: 25 additions & 1 deletion components/header/headerData.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
import { Braces, CircleHelp, Laptop, Moon, StickyNote, Sun } from "lucide-react"
import {
Braces,
CircleHelp,
Download,
Github,
Laptop,
Moon,
StickyNote,
Sun,
} from "lucide-react"
import React from "react"

type Button = {
Expand Down Expand Up @@ -44,6 +53,21 @@ const searchOptions: SearchOption[] = [
{ label: "Circuits", href: "/docs/circuits", icon: Braces },
],
},
{
group: "Resources",
links: [
{
label: "GitHub",
href: "https://github.com/rafacv23/f1-api",
icon: Github,
},
{
label: "NPM",
href: "https://www.npmjs.com/package/@f1api/sdk",
icon: Download,
},
],
},
{
group: "About",
links: [
Expand Down

0 comments on commit bbe495c

Please sign in to comment.