import { useRouter } from "next/router"; import useSWR from "swr"; // services import { UserService } from "services/user.service"; // components import { ActivityMessage } from "components/core"; // ui import { ProfileEmptyState } from "components/ui"; import { Loader } from "@plane/ui"; import { Rocket } from "lucide-react"; // image import recentActivityEmptyState from "public/empty-state/recent_activity.svg"; // helpers import { timeAgo } from "helpers/date-time.helper"; // fetch-keys import { USER_PROFILE_ACTIVITY } from "constants/fetch-keys"; // services const userService = new UserService(); export const ProfileActivity = () => { const router = useRouter(); const { workspaceSlug, userId } = router.query; const { data: userProfileActivity } = useSWR( workspaceSlug && userId ? USER_PROFILE_ACTIVITY(workspaceSlug.toString(), userId.toString()) : null, workspaceSlug && userId ? () => userService.getUserProfileActivity(workspaceSlug.toString(), userId.toString()) : null ); return (
{activity.actor_detail.display_name}
{activity.field ? (
{timeAgo(activity.created_at)}