diff --git a/components/JobImage/index.tsx b/components/JobImage/index.tsx index 513693a8..670899ea 100644 --- a/components/JobImage/index.tsx +++ b/components/JobImage/index.tsx @@ -1,13 +1,12 @@ -import React, { useEffect, useState } from 'react' +import React, { useState } from 'react' import { useRouter } from 'next/router' -import { useTranslation } from 'next-i18next' - -import { ACCESSORY_JOB_IDS } from '~utils/jobsWithAccessories' import Button from '~components/Button' import JobAccessoryPopover from '~components/JobAccessoryPopover' import ShieldIcon from '~public/icons/Shield.svg' +import ManaturaIcon from '~public/icons/Manatura.svg' + import './index.scss' interface Props { @@ -51,7 +50,7 @@ const JobImage = ({ return source } - const hasAccessory = job && ACCESSORY_JOB_IDS.includes(job.id) + const hasAccessory = job && job.accessory const image = {job?.name[locale]} function handleAccessoryButtonClicked() { @@ -64,9 +63,14 @@ const JobImage = ({ // Elements const accessoryButton = () => { + let icon + + if (job && job.accessory_type === 1) icon = + else if (job && job.accessory_type === 2) icon = + return (