Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use on click function for views api button #112

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelog/v0.0.38/api-page-reload-env-var-home-page-fix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
changelog:
- type: FIX
description: >-
Fixes the API page reload behavior when navigating to it with `VITE_API_PAGE_RELOAD=true` for the `view API` button
on the home page.
3 changes: 2 additions & 1 deletion projects/ui/src/Components/Home/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { HomePageCategoryCard } from "./HomePageCategoryCard";
import CardImage1 from "../../Assets/[email protected]";
import CardImage2 from "../../Assets/[email protected]";
import CardImage3 from "../../Assets/[email protected]";
import {onApisPageClick} from "../Structure/Header";

export function HomePage() {
const { isAdmin } = useContext(AuthContext);
Expand All @@ -27,7 +28,7 @@ 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 && (
<NavLink to="/apis">
<NavLink to="/apis" onClick={onApisPageClick}>
<Button style={{ width: "150px", marginTop: "10px" }}>
VIEW APIS
</Button>
Expand Down
Loading