Skip to content

Commit

Permalink
fix: modify style of text when description is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
whalekiller03 committed Mar 17, 2024
1 parent 35a3fde commit d3aab02
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions components/Profile/UserTabs/UserInfoBasic.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ function UserInfoBasic({ description = '', wantToDoList = [], share = '' }) {
<StyledPanelText sx={{ paddingTop: '6px' }}>
<p>簡介</p>
<div>
{description
? description.split('\n').map((d) => <span>{d}</span>)
: '尚未填寫'}
{description ? (
description.split('\n').map((d) => <span>{d}</span>)
) : (
<span>尚未填寫</span>
)}
</div>
</StyledPanelText>
</StyledPanelBox>
Expand Down

0 comments on commit d3aab02

Please sign in to comment.