From 759e3473711c8f94a15e42b56f32ee4938cada4c Mon Sep 17 00:00:00 2001 From: Nicholas Bucher Date: Mon, 11 Nov 2024 14:30:52 -0500 Subject: [PATCH] fix for homepage link Signed-off-by: Nicholas Bucher --- changelog/v0.0.38/api-page-reload-env-var-fix.yaml | 4 ++++ projects/ui/src/Components/Common/Button.tsx | 3 ++- projects/ui/src/Components/Home/HomePage.tsx | 8 ++++++-- 3 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 changelog/v0.0.38/api-page-reload-env-var-fix.yaml diff --git a/changelog/v0.0.38/api-page-reload-env-var-fix.yaml b/changelog/v0.0.38/api-page-reload-env-var-fix.yaml new file mode 100644 index 00000000..0affce6a --- /dev/null +++ b/changelog/v0.0.38/api-page-reload-env-var-fix.yaml @@ -0,0 +1,4 @@ +changelog: + - type: FIX + description: >- + Fixes the API page reload behavior for the home page link. diff --git a/projects/ui/src/Components/Common/Button.tsx b/projects/ui/src/Components/Common/Button.tsx index 60c31951..ceea19b8 100644 --- a/projects/ui/src/Components/Common/Button.tsx +++ b/projects/ui/src/Components/Common/Button.tsx @@ -42,6 +42,7 @@ export function Button( props: { color?: "primary" | "success" | "warning" | "danger" | "secondary"; variant?: "outline" | "subtle" | "light" | "filled"; + tabIndex?: number; onClick?: MouseEventHandler; /** * `isText` defaults to true, and can be set to false to render the contents directly under the button. @@ -95,7 +96,7 @@ export function Button( // Render // return ( - + {!!isText ? ( {props.children} ) : ( diff --git a/projects/ui/src/Components/Home/HomePage.tsx b/projects/ui/src/Components/Home/HomePage.tsx index 47d5e387..c74099e1 100644 --- a/projects/ui/src/Components/Home/HomePage.tsx +++ b/projects/ui/src/Components/Home/HomePage.tsx @@ -15,6 +15,7 @@ import { HomePageCategoryCard } from "./HomePageCategoryCard"; import CardImage1 from "../../Assets/card-option-1@2x.webp"; import CardImage2 from "../../Assets/card-option-2@2x.webp"; import CardImage3 from "../../Assets/card-option-3@2x.webp"; +import { onApisPageClick } from "../Structure/Header"; export function HomePage() { const { isAdmin } = useContext(AuthContext); @@ -27,8 +28,11 @@ export function HomePage() { description={`Welcome to the ${companyName} Developer Portal. Connect, partner, and build with us to create the next generation of digital experiences.`} additionalContent={ !isAdmin && ( - -