"use client"; import { useState } from "react"; import { observer } from "mobx-react"; // ui import { Button } from "@plane/ui"; // components import { PageHead } from "@/components/core"; import { SidebarHamburgerToggle } from "@/components/core/sidebar"; import { EmptyState } from "@/components/empty-state"; import { ProfileActivityListPage } from "@/components/profile"; // constants import { EmptyStateType } from "@/constants/empty-state"; const PER_PAGE = 100; const ProfileActivityPage = observer(() => { // states const [pageCount, setPageCount] = useState(1); const [totalPages, setTotalPages] = useState(0); const [resultsCount, setResultsCount] = useState(0); const [isEmpty, setIsEmpty] = useState(false); const updateTotalPages = (count: number) => setTotalPages(count); const updateResultsCount = (count: number) => setResultsCount(count); const updateEmptyState = (isEmpty: boolean) => setIsEmpty(isEmpty); const handleLoadMore = () => setPageCount((prev) => prev + 1); const activityPages: JSX.Element[] = []; for (let i = 0; i < pageCount; i++) activityPages.push( ); const isLoadMoreVisible = pageCount < totalPages && resultsCount !== 0; if (isEmpty) { return ; } return ( <>

Activity

{activityPages} {isLoadMoreVisible && (
)}
); }); export default ProfileActivityPage;