Merge pull request #165 from jedmund/fix-job-icons

Use proper URL for job icons
This commit is contained in:
Justin Edmund 2023-01-23 15:09:52 -08:00 committed by GitHub
commit 759807f950
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View file

@ -95,7 +95,7 @@ const JobDropdown = React.forwardRef<HTMLSelectElement, Props>(
key={i}
value={item.id}
altText={item.name[locale]}
iconSrc={`/images/job-icons/${item.granblue_id}.png`}
iconSrc={`${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/job-icons/${item.granblue_id}.png`}
>
{item.name[locale]}
</SelectItem>
@ -116,7 +116,9 @@ const JobDropdown = React.forwardRef<HTMLSelectElement, Props>(
value={currentJob ? currentJob.id : 'no-job'}
altText={currentJob ? currentJob.name[locale] : ''}
iconSrc={
currentJob ? `/images/job-icons/${currentJob.granblue_id}.png` : ''
currentJob
? `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/job-icons/${currentJob.granblue_id}.png`
: ''
}
open={open}
onClick={openJobSelect}

View file

@ -149,7 +149,7 @@ const JobSection = (props: Props) => {
<div className="JobName">
<img
alt={party.job.name[locale]}
src={`/images/job-icons/${party.job.granblue_id}.png`}
src={`${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/job-icons/${party.job.granblue_id}.png`}
/>
<h3>{party.job ? party.job.name[locale] : t('no_job')}</h3>
</div>