From 92a21ff4c5df6e9f771cfbd140835dce3b6d7b0d Mon Sep 17 00:00:00 2001
From: Sebastien Castiel <sebastien@castiel.me>
Date: Fri, 8 Dec 2023 14:56:51 -0500
Subject: Migration script, improvements in expenses list

---
 src/app/groups/recent-group-list.tsx | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)

(limited to 'src/app/groups/recent-group-list.tsx')

diff --git a/src/app/groups/recent-group-list.tsx b/src/app/groups/recent-group-list.tsx
index ef43372..92bc743 100644
--- a/src/app/groups/recent-group-list.tsx
+++ b/src/app/groups/recent-group-list.tsx
@@ -2,7 +2,7 @@
 import { getRecentGroups } from '@/app/groups/recent-groups-helpers'
 import { Button } from '@/components/ui/button'
 import { getGroups } from '@/lib/api'
-import { Loader2 } from 'lucide-react'
+import { Calendar, Loader2, Users } from 'lucide-react'
 import Link from 'next/link'
 import { useEffect, useState } from 'react'
 import { z } from 'zod'
@@ -58,14 +58,24 @@ export function RecentGroupList({ getGroupsAction }: Props) {
           <li key={group.id}>
             <Button variant="outline" className="h-fit w-full py-3" asChild>
               <Link href={`/groups/${group.id}`} className="text-base">
-                <div className="w-full flex flex-col items-start gap-1">
+                <div className="w-full flex flex-col gap-1">
                   <div className="text-base">{group.name}</div>
                   <div className="text-muted-foreground font-normal text-xs">
                     {details ? (
-                      <>
-                        {details._count.participants} participants ·{' '}
-                        {details.currency}
-                      </>
+                      <div className="w-full flex items-center justify-between">
+                        <div className="flex items-center">
+                          <Users className="w-3 h-3 inline mr-1" />
+                          <span>{details._count.participants}</span>
+                        </div>
+                        <div className="flex items-center">
+                          <Calendar className="w-3 h-3 inline mx-1" />
+                          <span>
+                            {details.createdAt.toLocaleDateString('en-US', {
+                              dateStyle: 'medium',
+                            })}
+                          </span>
+                        </div>
+                      </div>
                     ) : (
                       <>
                         <Loader2 className="w-3 h-3 mr-1 inline animate-spin" />
-- 
cgit v1.3

