mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2025-08-01 06:33:52 +08:00
[offers][fix] fix profile location display (#497)
This commit is contained in:
@ -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 '-';
|
||||
}
|
||||
|
Reference in New Issue
Block a user