Skip to content

Commit

Permalink
activityCard
Browse files Browse the repository at this point in the history
  • Loading branch information
Neo-Ryo committed May 30, 2024
1 parent 854f85a commit a57fa57
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/manager/activity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/components/activities/ActivityCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export const ActivityCard = ({
)}
</p>
<div style={{ display: 'flex', alignItems: 'center' }}>
<p className="text text--small">Publié le {toDate(activity.createDate as string)} </p>
<p className="text text--small">Publié le {toDate(activity.publishDate as string)} </p>
{userIsPelico ? (
<Link href={`/pelico-profil`}>
<PelicoNeutre style={{ marginLeft: '0.6rem', height: '16px', width: 'auto', cursor: 'pointer' }} />
Expand Down
1 change: 1 addition & 0 deletions types/activity.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export interface Activity<T extends AnyData = AnyData> {

createDate?: Date | string;
updateDate?: Date | string;
publishDate?: Date | string;
deleteDate?: Date | string;

// activity data
Expand Down

0 comments on commit a57fa57

Please sign in to comment.