Skip to content

Commit

Permalink
fix: 修复工作时间展示问题
Browse files Browse the repository at this point in the history
  • Loading branch information
visiky committed Apr 26, 2023
1 parent 1cea4ce commit 263b4eb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/components/Resume/Template1/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,10 @@ export const Template1: React.FC<Props> = props => {
})(
<div className="section section-work-exp">
{_.map(workExpList, (work, idx) => {
const start = work.work_time[0];
const end = work.work_time[1] ? work.work_time[1] : null;
const [start = null, end = null] =
typeof work.work_time === 'string'
? `${work.work_time || ''}`.split(',')
: work.work_time;
return work ? (
<div className="section-item" key={idx.toString()}>
<div className="section-info">
Expand Down
6 changes: 4 additions & 2 deletions src/components/Resume/Template2/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,10 @@ export const Template2: React.FC<Props> = props => {
>
<div className="section section-work-exp">
{_.map(workExpList, (work, idx) => {
const start = work.work_time[0];
const end = work.work_time[1] ? work.work_time[1] : null;
const [start = null, end = null] =
typeof work.work_time === 'string'
? `${work.work_time || ''}`.split(',')
: work.work_time;
return work ? (
<div className="section-item" key={idx.toString()}>
<div className="section-info">
Expand Down
6 changes: 4 additions & 2 deletions src/components/Resume/Template3/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,10 @@ export const Template3: React.FC<Props> = props => {
})(
<div className="section section-work-exp">
{_.map(workExpList, (work, idx) => {
const start = work.work_time[0];
const end = work.work_time[1] ? work.work_time[1] : null;
const [start = null, end = null] =
typeof work.work_time === 'string'
? `${work.work_time || ''}`.split(',')
: work.work_time;
return work ? (
<div className="section-item" key={idx.toString()}>
<div className="section-info">
Expand Down

0 comments on commit 263b4eb

Please sign in to comment.