From ba6c45d5510f7b9ce5d69f5c268667c310316b92 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Mon, 2 Jan 2023 00:52:26 -0800 Subject: [PATCH] Fix job image rendering * Only render when job selected * Render localized name as alt string --- components/JobSection/index.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/components/JobSection/index.tsx b/components/JobSection/index.tsx index 50b390a7..13e84a9f 100644 --- a/components/JobSection/index.tsx +++ b/components/JobSection/index.tsx @@ -1,4 +1,4 @@ -import React, { ForwardedRef, useEffect, useState } from 'react' +import React, { useEffect, useState } from 'react' import { useRouter } from 'next/router' import { useSnapshot } from 'valtio' import { useTranslation } from 'next-i18next' @@ -8,7 +8,6 @@ import JobSkillItem from '~components/JobSkillItem' import SearchModal from '~components/SearchModal' import { appState } from '~utils/appState' - import type { JobSkillObject, SearchableObject } from '~types' import './index.scss' @@ -132,7 +131,11 @@ const JobSection = (props: Props) => { return (
- + {party.job && party.job.id !== '-1' ? ( + {party.job.name[locale]} + ) : ( + '' + )}