From 01aeeaf4135715206cc998e68a4f2b41f99527cc Mon Sep 17 00:00:00 2001 From: nick-w-nick <43578531+nick-w-nick@users.noreply.github.com> Date: Tue, 11 Feb 2025 10:28:08 -0500 Subject: [PATCH] feat: Dynamically Link back to the Goose homepage from the extensions site (#953) --- extensions-site/app/components/header.tsx | 8 ++++++-- extensions-site/app/constants.ts | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 extensions-site/app/constants.ts diff --git a/extensions-site/app/components/header.tsx b/extensions-site/app/components/header.tsx index 06f5b93535..8770beb062 100644 --- a/extensions-site/app/components/header.tsx +++ b/extensions-site/app/components/header.tsx @@ -2,6 +2,7 @@ import { IconDownload } from "./icons/download"; import { IconGoose } from "./icons/goose"; import { ThemeToggle } from "./themeToggle"; import { Button } from "./ui/button"; +import { SiteURLs } from '../constants'; import { NavLink, useLocation } from "react-router"; export const Header = () => { @@ -9,11 +10,14 @@ export const Header = () => { const { hash, pathname, search } = location; const stableDownload = "https://github.com/block/goose/releases/download/stable/Goose.zip"; - + + // link back to the main site if the icon is clicked on the extensions homepage + // otherwise link back to the extensions homepage + const gooseIconLink = pathname === "/" ? SiteURLs.GOOSE_HOMEPAGE : "/"; return (
- +
diff --git a/extensions-site/app/constants.ts b/extensions-site/app/constants.ts new file mode 100644 index 0000000000..319d5279a8 --- /dev/null +++ b/extensions-site/app/constants.ts @@ -0,0 +1,3 @@ +export const SiteURLs = { + GOOSE_HOMEPAGE: "https://block.github.io/goose/", +};