From 6e5805977a0d1a7c4e5d48f64d56f4be1a7cb87e Mon Sep 17 00:00:00 2001 From: Carlos Valente Date: Tue, 6 Jan 2026 08:09:25 +0100 Subject: [PATCH] refactor: hide logo on error --- .../src/common/components/view-logo/ViewLogo.tsx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/apps/client/src/common/components/view-logo/ViewLogo.tsx b/apps/client/src/common/components/view-logo/ViewLogo.tsx index 6ed80ae1f..30fd343c7 100644 --- a/apps/client/src/common/components/view-logo/ViewLogo.tsx +++ b/apps/client/src/common/components/view-logo/ViewLogo.tsx @@ -1,3 +1,5 @@ +import { useRef } from 'react'; + import { projectLogoPath } from '../../api/constants'; import './ViewLogo.scss'; @@ -7,13 +9,19 @@ interface ViewLogoProps { className: string; } -export default function ViewLogo(props: ViewLogoProps) { - const { name, className } = props; +export default function ViewLogo({ name, className }: ViewLogoProps) { + const imageRef = useRef(null); + + const hideImage = () => { + if (!imageRef.current) return; + + imageRef.current.style.display = 'none'; + }; // we wrap the image in a div to help maintain the aspect ratio return (
- +
); }