this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(group): improve history view

+23 -3
+1
package.json
··· 18 18 "better-auth": "^1.4.18", 19 19 "class-variance-authority": "^0.7.1", 20 20 "clsx": "^2.1.1", 21 + "date-fns": "^4.1.0", 21 22 "dotenv": "^17.3.1", 22 23 "drizzle-orm": "^0.45.1", 23 24 "next": "16.1.6",
+8
pnpm-lock.yaml
··· 32 32 clsx: 33 33 specifier: ^2.1.1 34 34 version: 2.1.1 35 + date-fns: 36 + specifier: ^4.1.0 37 + version: 4.1.0 35 38 dotenv: 36 39 specifier: ^17.3.1 37 40 version: 17.3.1 ··· 1536 1539 data-uri-to-buffer@4.0.1: 1537 1540 resolution: {integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==} 1538 1541 engines: {node: '>= 12'} 1542 + 1543 + date-fns@4.1.0: 1544 + resolution: {integrity: sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==} 1539 1545 1540 1546 debug@4.4.3: 1541 1547 resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} ··· 3991 3997 csstype@3.2.3: {} 3992 3998 3993 3999 data-uri-to-buffer@4.0.1: {} 4000 + 4001 + date-fns@4.1.0: {} 3994 4002 3995 4003 debug@4.4.3: 3996 4004 dependencies:
+14 -3
src/components/group.tsx
··· 13 13 } from "@hugeicons/core-free-icons"; 14 14 import { HugeiconsIcon } from "@hugeicons/react"; 15 15 import type { User } from "better-auth"; 16 + import { formatDistanceToNow } from "date-fns"; 16 17 import Link from "next/link"; 17 18 import { useState } from "react"; 18 19 import CustomAvatar from "@/components/avatar"; ··· 412 413 <ItemGroup> 413 414 {redemptions.map((redemption) => ( 414 415 <Item key={redemption.id}> 416 + <ItemMedia> 417 + <CustomAvatar 418 + name={redemption.user.name} 419 + image={redemption.user.image as string} 420 + /> 421 + </ItemMedia> 415 422 <ItemContent> 416 423 <ItemTitle> 417 - <strong>{redemption.user.name}</strong> redeemed{" "} 418 - <strong>{redemption.voucher.name}</strong> 424 + <div> 425 + <strong>{redemption.user.name}</strong> redeemed{" "} 426 + <strong>{redemption.voucher.name}</strong> 427 + </div> 419 428 </ItemTitle> 420 429 <ItemDescription> 421 - {redemption.date.toLocaleString()} 430 + {formatDistanceToNow(redemption.date, { 431 + addSuffix: true, 432 + })} 422 433 </ItemDescription> 423 434 </ItemContent> 424 435 </Item>