Merge branch 'feat/ui-0.5.0' into 'test'

fix: update use info is empty

See merge request opensource/answer!307
This commit is contained in:
Li Shuailing 2022-12-02 06:17:30 +00:00
commit dcaa7fe3b6
2 changed files with 4 additions and 2 deletions

View File

@ -118,7 +118,8 @@ const Index: FC<Props> = ({
/>
</Col>
<Col lg={3} className="mb-3 mb-md-0">
{data.update_user_info?.username !== data.user_info?.username ? (
{data.update_user_info &&
data.update_user_info?.username !== data.user_info?.username ? (
<UserCard
data={data?.update_user_info}
time={Number(data.update_time)}

View File

@ -130,7 +130,8 @@ const Index: FC<Props> = ({ data, initPage, hasAnswer, isLogged }) => {
/>
</Col>
<Col lg={3} className="mb-3 mb-md-0">
{data.update_user_info?.username !== data.user_info?.username ? (
{data.update_user_info &&
data.update_user_info?.username !== data.user_info?.username ? (
<UserCard
data={data?.update_user_info}
time={data.edit_time}