[offers][fix] fix profile location display (#497)

pull/499/head
Zhang Ziqing 2 years ago committed by GitHub
parent f7d1c8d2c4
commit 7e06e07df4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -246,7 +246,7 @@ export default function ProfileHeader({
{(experiences[0]?.companyName ||
experiences[0]?.jobLevel ||
experiences[0]?.jobTitle) && (
<div className="flex flex-row">
<div className="flex flex-row text-slate-600">
<span>
<BuildingOffice2Icon className="mr-2.5 h-5 w-5" />
</span>
@ -262,7 +262,7 @@ export default function ProfileHeader({
</p>
</div>
)}
<div className="flex flex-row">
<div className="flex flex-row text-slate-600">
<CalendarDaysIcon className="mr-2.5 h-5" />
<p>
<span className="mr-2 font-bold">YOE:</span>

@ -42,9 +42,9 @@ export default function OfferTableRow({
<td className="py-4 px-4">{convertMoneyToString(income)}</td>
{jobType === JobType.FULLTIME && (
<td className="py-4 px-4">
{`${baseSalary && convertMoneyToString(baseSalary)} / ${
bonus && convertMoneyToString(bonus)
} / ${stocks && convertMoneyToString(stocks)}`}
{`${convertMoneyToString(baseSalary)} / ${convertMoneyToString(
bonus,
)} / ${convertMoneyToString(stocks)}`}
</td>
)}
<td className="py-4 px-4">{formatDate(monthYearReceived)}</td>

@ -132,6 +132,7 @@ export default function OfferProfile() {
? getLabelForJobTitleType(experience.title as JobTitleType)
: null,
jobType: experience.jobType || undefined,
location: experience.location,
monthlySalary: experience.monthlySalary
? convertMoneyToString(experience.monthlySalary)
: null,

@ -4,7 +4,11 @@ import { Currency } from './CurrencyEnum';
export const baseCurrencyString = Currency.USD.toString();
export function convertMoneyToString({ currency, value }: Money) {
export function convertMoneyToString(money: Money | undefined) {
if (!money) {
return '-';
}
const { currency, value } = money;
if (!value) {
return '-';
}

Loading…
Cancel
Save