Skip to content

Commit 441a3c2

Browse files
committed
fix: user page bug
1 parent e9731ef commit 441a3c2

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/components/ImageWithPreview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const ImageWithPreview = ({ src, alt, ...rest }: ImageWithPreviewProps) => {
7474
src={src}
7575
alt={alt}
7676
className='max-h-full max-w-full object-contain'
77-
style={{ cursor: 'zoom-out' }}
77+
style={{ cursor: 'zoom-out', maxHeight: '80%' }}
7878
/>
7979
<button
8080
className='absolute top-4 right-4 rounded-full bg-black bg-opacity-50 p-1 text-white'

src/components/user/CommentList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ const CommentList: React.FC<CommentListProps> = ({ uid, t, i18n_lang }) => {
9898
);
9999
})}
100100
<Pagination
101-
hidden={!data.has_more}
101+
hidden={data.page_total === 1}
102102
NextText={t('page_next')}
103103
PreviousText={t('page_prev')}
104104
current={data.page}

src/components/user/RepoList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const RepoList = ({ uid, t }: UserTabProps) => {
2828
<div className='text-right'>
2929
<select
3030
onChange={selectState}
31-
className='truncate text-ellipsis rounded-md border py-1 pr-7 text-sm dark:bg-gray-700'
31+
className='w-fit truncate text-ellipsis rounded-md border py-1 pr-7 text-sm dark:bg-gray-700'
3232
>
3333
{categoryItems.map((item: any) => (
3434
<option key={item.name} value={item.value}>

src/components/user/RepoRecord.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ const RepoData = ({ data, setPage, showStatus }: RepoDataProps) => {
152152

153153
<Pagination
154154
className='mt-2'
155-
hidden={!data.has_more}
155+
hidden={data.page_total === 1}
156156
PreviousText={t('page_prev')}
157157
NextText={t('page_next')}
158158
current={data.page}

0 commit comments

Comments
 (0)