From 7aa495d9ae2cf8de8e4d47c47f6a06284fb521f2 Mon Sep 17 00:00:00 2001 From: Jonni Date: Tue, 22 Oct 2024 16:52:56 +0000 Subject: [PATCH] fix: logo --- .../financial-aid/src/components/Logo/Logo.tsx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/libs/application/templates/financial-aid/src/components/Logo/Logo.tsx b/libs/application/templates/financial-aid/src/components/Logo/Logo.tsx index bfdef4d8a00e..321debab00e3 100644 --- a/libs/application/templates/financial-aid/src/components/Logo/Logo.tsx +++ b/libs/application/templates/financial-aid/src/components/Logo/Logo.tsx @@ -16,17 +16,16 @@ export const Logo = ({ application }: Props) => { useEffect(() => { const getLogo = async () => { + const municipalityId = + municipality && municipality?.municipalityId + ? municipality.municipalityId + : '' const svgLogo = await import( - `../../assets/svg/${ - logoKeyFromMunicipalityCode[ - municipality ? municipality?.municipalityId : '' - ] - }` + `../../assets/svg/${logoKeyFromMunicipalityCode[municipalityId]}` ) setLogo(svgLogo.default) } getLogo() }, []) - return Municipality logo }