Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Commit

Permalink
Merge pull request #33 from celeron533/bug_fix
Browse files Browse the repository at this point in the history
Bug fix: crash when viewing 'mature content' without login
  • Loading branch information
melchior-voidwolf authored Feb 26, 2022
2 parents 92dfd39 + f37d689 commit 0f55a09
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/page/ArtDetailPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ const ArtDetail = (props) => {
return <div className='art-detail-page'>
<TitleBar />
{isViewerDisplay && <WxImageViewer onClose={() => setDisplay(false)} urls={[picSrc]} index={0}/>}
<img className='art-preview' onClick={() => setDisplay(true)} src={picSrc} />
{
isLoading || <>
{!isLoading && data.success === true && <>
<img className='art-preview' onClick={() => setDisplay(true)} src={picSrc} />

<div className="art-info-title">{data.artwork.title}</div>
<div className="desc-info">
{data.artwork.description}
Expand Down Expand Up @@ -57,6 +57,10 @@ const ArtDetail = (props) => {
/>
</>
}
{!isLoading && data.success == false && <>
<div className='art-info-title'>请先登录</div>
<div className="desc-info">{data.errorinfo}</div>
</>}
</div>
}

Expand Down

0 comments on commit 0f55a09

Please sign in to comment.