From a57fa57e640957a14b9c75fd1b7b2aa15d41b4f3 Mon Sep 17 00:00:00 2001 From: Neo Ryo Date: Thu, 30 May 2024 14:21:21 +0200 Subject: [PATCH] activityCard --- server/manager/activity.ts | 2 +- src/components/activities/ActivityCard/index.tsx | 2 +- types/activity.type.ts | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/server/manager/activity.ts b/server/manager/activity.ts index 3ea43e393..d0f41e5be 100644 --- a/server/manager/activity.ts +++ b/server/manager/activity.ts @@ -100,7 +100,7 @@ export const getActivities = async ({ const activities = await subQueryBuilder .orderBy('activity.isPinned', 'DESC') - .addOrderBy('activity.updateDate', 'DESC') + .addOrderBy('activity.publishDate', 'DESC') .limit(limit) .offset(page * limit) .getMany(); diff --git a/src/components/activities/ActivityCard/index.tsx b/src/components/activities/ActivityCard/index.tsx index 1449c0326..76a156262 100644 --- a/src/components/activities/ActivityCard/index.tsx +++ b/src/components/activities/ActivityCard/index.tsx @@ -120,7 +120,7 @@ export const ActivityCard = ({ )}

-

PubliƩ le {toDate(activity.createDate as string)}

+

PubliƩ le {toDate(activity.publishDate as string)}

{userIsPelico ? ( diff --git a/types/activity.type.ts b/types/activity.type.ts index 02e952cad..c71456c48 100644 --- a/types/activity.type.ts +++ b/types/activity.type.ts @@ -39,6 +39,7 @@ export interface Activity { createDate?: Date | string; updateDate?: Date | string; + publishDate?: Date | string; deleteDate?: Date | string; // activity data