From ea688ed9bcfbd2b54dfd1660a3d659bff9e2411e Mon Sep 17 00:00:00 2001 From: imhson Date: Thu, 8 Aug 2024 16:38:47 +0700 Subject: [PATCH] update pc --- src/components/pages/artist/Artworks.tsx | 30 +++++---- src/components/pages/artist/Collections.tsx | 4 +- src/components/pages/artist/Contests.tsx | 31 ++++++--- src/components/pages/artist/Mangas.tsx | 4 +- src/pages/artist/[artist]/artist.tsx | 74 ++++++++++++++++++--- 5 files changed, 108 insertions(+), 35 deletions(-) diff --git a/src/components/pages/artist/Artworks.tsx b/src/components/pages/artist/Artworks.tsx index 094ce28..2b8a268 100644 --- a/src/components/pages/artist/Artworks.tsx +++ b/src/components/pages/artist/Artworks.tsx @@ -45,21 +45,23 @@ export default function ArtworkList({ id }) { {data?.artworks?.length ? ( <> - - {data?.artworks?.map((artwork, index) => ( - - - - ))} - +
+ + {data?.artworks?.map((artwork, index) => ( + + + + ))} + +
-
+
{data?.artworks?.slice((page - 1) * 12, page * 12)?.map((artwork, index) => (
(
)} {!!data?.count && ( -
+
+
- {t('Back')} + {t('Back')} + {selectedContest[locale].title}
{t('View Contest')}
{t('Mangas')}
-
- {contestData.mangas.map((manga,index) => ( +
+ {contestData.mangas.map((manga, index) => (
))}
-
{t('Artworks')}
-
+
{t('Artworks')}
+
{contestData?.artworks?.artworks?.slice((artworkPage - 1) * 12, artworkPage * 12)?.map((artwork, index) => (
))}
+ {!!data?.count && ( +
+ , value: number) => { + setArtworkPage(value) + }} + /> +
+ )} {contestData?.artworks?.artworks?.map((artwork, index) => ( @@ -100,7 +113,7 @@ export default function Contests({ id }) { height={300} src={artwork.url} alt='' - className='w-full h-auto rounded-md object-cover' + className='w-full h-auto rounded-md object-cover lg:max-w-[40vw]' /> ))} @@ -117,7 +130,7 @@ export default function Contests({ id }) {
setSelectedContest(contest)} key={contest.slug} - className='rounded-mlg p-4 bg-white relative'> + className='rounded-mlg p-4 bg-white relative lg:border lg:border-border-secondary cursor-pointer'>
)} {!!data?.count && ( -
+
+
{data?.length ? (
{data?.slice((page - 1) * 20, page * 20)?.map((comic, index) => ( @@ -37,7 +37,7 @@ export default function MangaList({ id }) { ))}
) : ( -
+
{t('No manga found')}
diff --git a/src/pages/artist/[artist]/artist.tsx b/src/pages/artist/[artist]/artist.tsx index 82ec3b8..effc328 100644 --- a/src/pages/artist/[artist]/artist.tsx +++ b/src/pages/artist/[artist]/artist.tsx @@ -9,6 +9,7 @@ import NoImg from 'images/avatar.svg' import moment from 'moment' import getConfig from 'next/config' import Image from 'next/image' +import Link from 'next/link' import { useRouter } from 'next/router' import { Fragment, useState } from 'react' import { useTranslation } from 'react-i18next' @@ -29,8 +30,51 @@ function Artist({ artistDetail, data }) { const seekhypeBaseUrl = new URL(getConfig().SEEKHYPE_URL).origin if (!artist) return <> return ( -
-
+
+
+
+ {artist.link?.behance && ( + + + + + + + + + )} + {artist.link?.website && ( + + + + + + + + )} +
-
+
setTab('artworks')}> {t('Artworks')}
-
+ + +
@@ -121,17 +179,17 @@ function Artist({ artistDetail, data }) {
setTab('collections')} - className={`py-3 font-semibold border-b border-border-teriary ${ + className={`py-3 font-semibold border-b border-border-teriary cursor-pointer ${ tab == 'collections' ? 'text-text-brand-defaul' : 'text-text-primary' }`}> - NFT Collections + {t('NFT Collections')}
setTab('contests')} - className={`py-3 font-semibold ${ + className={`py-3 font-semibold cursor-pointer ${ tab == 'contests' ? 'text-text-brand-defaul' : 'text-text-primary' }`}> - Contests + {t('Contests')}