From 586fab52e35c22635ac5d2559a0486c5b93721e5 Mon Sep 17 00:00:00 2001 From: ethangardner Date: Thu, 12 Dec 2024 17:43:17 -0500 Subject: [PATCH] rename function --- apps/spotlight/src/components/Footer.astro | 4 ++-- apps/spotlight/src/components/Header.astro | 10 ++++++---- apps/spotlight/src/routes.ts | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/apps/spotlight/src/components/Footer.astro b/apps/spotlight/src/components/Footer.astro index 9213b964..2de1d825 100644 --- a/apps/spotlight/src/components/Footer.astro +++ b/apps/spotlight/src/components/Footer.astro @@ -1,7 +1,7 @@ --- import { type GithubRepository, getBranchTreeUrl } from '../lib/github.js'; import { Image } from 'astro:assets'; -import { getBaseUrl } from '../routes'; +import { getPublicDirUrl } from '../routes'; type Props = { github: GithubRepository; @@ -26,7 +26,7 @@ const { github } = Astro.props; class="usa-identifier__logo GSAFooter__logo" > GSA.gov home. { if (url === Astro.url.pathname) { @@ -12,8 +12,10 @@ const getNavLinkClasses = (url: string) => { } }; -const currentRoute = Astro.url.pathname; -const isAboutContent = currentRoute.startsWith('/about'); +const currentRoute = Astro.url.href; +console.log(currentRoute); +console.log(`${routes.getHomeUrl()}about`); +const isAboutContent = currentRoute.startsWith(`${routes.getHomeUrl()}about`); const showAboutContent = false; --- @@ -32,7 +34,7 @@ const showAboutContent = false; 10x Forms Platform home { return `${context.baseUrl}design/index.html`; }; -export const getBaseUrl = () => { +export const getPublicDirUrl = () => { const context = getAppContext(); return context.baseUrl; };