From c24c8ecfcb2d1e367cb74ea45956f745fc6ec1f8 Mon Sep 17 00:00:00 2001 From: Garry O'Donnell Date: Tue, 30 May 2023 10:42:44 +0000 Subject: [PATCH] Make entire homepage card clickable --- .../app/src/components/home/HomePage.tsx | 73 +++++++++++-------- 1 file changed, 42 insertions(+), 31 deletions(-) diff --git a/backstage/packages/app/src/components/home/HomePage.tsx b/backstage/packages/app/src/components/home/HomePage.tsx index 1fc633db..531968dc 100644 --- a/backstage/packages/app/src/components/home/HomePage.tsx +++ b/backstage/packages/app/src/components/home/HomePage.tsx @@ -3,6 +3,7 @@ import { configApiRef, useApi } from '@backstage/core-plugin-api'; import { Button, Card, + CardActionArea, CardActions, CardContent, Grid, @@ -15,52 +16,62 @@ import { useNavigate } from 'react-router-dom'; const SoftwareCatalogCard = () => { const navigate = useNavigate(); - const handleOnClick = () => navigate('/catalog'); const orgName = useApi(configApiRef).getOptionalString('organization.name') ?? 'Backstage'; return ( - - - - Software Catalog - - - A central location to discover software components developed at{' '} - {orgName}. - - - - - + + navigate('/catalog')}> + + + Software Catalog + + + A central location to discover software components developed at{' '} + {orgName}. + + + + + + ); }; const DeveloperGuideCard = () => { const navigate = useNavigate(); - const handleOnClick = () => navigate('/guide'); const orgName = useApi(configApiRef).getOptionalString('organization.name') ?? 'Backstage'; return ( - - - Developer Guide - - - Extensive documentation on developing software at {orgName}. Including - Tutorials, How-Tos, Explanations & References. - - - - - + navigate('/guide')}> + + + Developer Guide + + + Extensive documentation on developing software at {orgName}. + Including Tutorials, How-Tos, Explanations & References. + + + + + + ); };