Skip to content

Commit

Permalink
update artist
Browse files Browse the repository at this point in the history
  • Loading branch information
imhson committed Nov 29, 2023
1 parent 4413ede commit 4bc0716
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/pages/artist/[artist]/artist.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default function Page(props) {
}
return <Artist {...props} />
}
function Artist({ artistDetail }) {
function Artist({ artistDetail, data }) {
const artist = artistDetail.data as IArtist
const { locale } = useRouter()
const { t } = useTranslation()
Expand Down Expand Up @@ -140,7 +140,9 @@ function Artist({ artistDetail }) {
<div
className={`font-medium whitespace-pre-wrap ${showMore ? '' : 'line-clamp-3'}`}
onClick={() => setShowMore(!showMore)}
dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(artist?.bio) }}></div>
dangerouslySetInnerHTML={{
__html: DOMPurify.sanitize(locale == 'vn' ? artist?.bio : data?.description || artist?.bio),
}}></div>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/artist/[artist]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function Page(props) {
return (
<>
<HeadComponent data={props.pageProps?.metadata || props.metadata} />
<ComposedArtist />
<ComposedArtist data={props.pageProps?.metadata || props.metadata} />
</>
)
}
Expand Down

0 comments on commit 4bc0716

Please sign in to comment.