fix: profile activity load more button (#4049)

This commit is contained in:
Aaryan Khandelwal 2024-03-22 20:46:13 +05:30 committed by GitHub
parent ec837a42d5
commit 31b2fa2c14
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -41,17 +41,19 @@ const ProfileActivityPage: NextPageWithLayout = observer(() => {
/> />
); );
const isLoadMoreVisible = pageCount < totalPages && resultsCount !== 0;
return ( return (
<> <>
<PageHead title="Profile - Activity" /> <PageHead title="Profile - Activity" />
<section className="mx-auto mt-5 md:mt-16 h-full w-full flex flex-col overflow-hidden px-8 pb-8 lg:w-3/5"> <section className="mx-auto h-full w-full flex flex-col overflow-hidden px-8 pb-8 lg:w-3/5">
<div className="flex items-center border-b border-custom-border-100 gap-4 pb-3.5"> <div className="flex items-center border-b border-custom-border-100 gap-4 pb-3.5 mt-5 md:mt-16">
<SidebarHamburgerToggle onClick={() => themeStore.toggleSidebar()} /> <SidebarHamburgerToggle onClick={() => themeStore.toggleSidebar()} />
<h3 className="text-xl font-medium">Activity</h3> <h3 className="text-xl font-medium">Activity</h3>
</div> </div>
<div className="h-full flex flex-col overflow-y-auto vertical-scrollbar scrollbar-md"> <div className="h-full w-full flex flex-col overflow-y-auto vertical-scrollbar scrollbar-md">
{activityPages} {activityPages}
{pageCount < totalPages && resultsCount !== 0 && ( {isLoadMoreVisible && (
<div className="flex items-center justify-center text-xs w-full"> <div className="flex items-center justify-center text-xs w-full">
<Button variant="accent-primary" size="sm" onClick={handleLoadMore}> <Button variant="accent-primary" size="sm" onClick={handleLoadMore}>
Load more Load more