diff --git a/src/components/TeamActivity/TeamActivityItem.tsx b/src/components/TeamActivity/TeamActivityItem.tsx
index f63c2def2..68a07c1ff 100644
--- a/src/components/TeamActivity/TeamActivityItem.tsx
+++ b/src/components/TeamActivity/TeamActivityItem.tsx
@@ -5,6 +5,7 @@ import { ChevronsDown, ChevronsUp } from 'lucide-react';
type TeamActivityItemProps = {
onTopicClick?: (activity: TeamStreamActivity) => void;
+ teamId: string;
user: {
activities: TeamStreamActivity[];
_id: string;
@@ -15,7 +16,7 @@ type TeamActivityItemProps = {
};
export function TeamActivityItem(props: TeamActivityItemProps) {
- const { user, onTopicClick } = props;
+ const { user, onTopicClick, teamId } = props;
const { activities } = user;
const [showAll, setShowAll] = useState(false);
@@ -42,7 +43,7 @@ export function TeamActivityItem(props: TeamActivityItemProps) {
{resourceTitle}
@@ -51,7 +52,7 @@ export function TeamActivityItem(props: TeamActivityItemProps) {
const timeAgo = (date: string | Date) => (
- {getRelativeTimeString(new Date(date).toISOString())}
+ {getRelativeTimeString(new Date(date).toISOString(), true)}
);
const userAvatar = user.avatar
@@ -77,7 +78,7 @@ export function TeamActivityItem(props: TeamActivityItemProps) {
return (
{actionType === 'in_progress' && (
<>
@@ -122,13 +123,13 @@ export function TeamActivityItem(props: TeamActivityItemProps) {
const activityLimit = showAll ? activities.length : 5;
return (
-
+
{username} has {activities.length} updates in {uniqueResourcesCount}{' '}
resource(s)
-
+
{activities.slice(0, activityLimit).map((activity) => {
const { actionType, topicIds } = activity;
const topicCount = topicIds?.length || 0;
@@ -173,7 +174,7 @@ export function TeamActivityItem(props: TeamActivityItemProps) {
{activities.length > 5 && (