@@ -20,13 +20,19 @@ import {
20
20
Popover ,
21
21
StatusBadge ,
22
22
Table ,
23
+ Tooltip ,
23
24
usePagination ,
24
25
useRouterStuff ,
25
26
useTable ,
26
27
} from "@dub/ui" ;
27
28
import { CircleCheck , Dots , MoneyBill2 , MoneyBills2 } from "@dub/ui/icons" ;
28
- import { cn } from "@dub/utils" ;
29
- import { formatDate , formatPeriod } from "@dub/utils/src/functions/datetime" ;
29
+ import {
30
+ cn ,
31
+ DICEBEAR_AVATAR_URL ,
32
+ formatDate ,
33
+ formatDateTime ,
34
+ } from "@dub/utils" ;
35
+ import { formatPeriod } from "@dub/utils/src/functions/datetime" ;
30
36
import { fetcher } from "@dub/utils/src/functions/fetcher" ;
31
37
import { Row } from "@tanstack/react-table" ;
32
38
import { Command } from "cmdk" ;
@@ -137,16 +143,62 @@ const PayoutTableInner = memo(
137
143
} ,
138
144
} ,
139
145
{
140
- id : "paidAt" ,
141
146
header : "Paid" ,
142
147
cell : ( { row } ) =>
143
- row . original . paidAt
144
- ? formatDate ( row . original . paidAt , {
145
- month : "short" ,
146
- day : "numeric" ,
147
- year : undefined ,
148
- } )
149
- : "-" ,
148
+ row . original . paidAt ? (
149
+ < Tooltip
150
+ content = {
151
+ < div className = "flex flex-col gap-1 p-2.5" >
152
+ { row . original . user && (
153
+ < div className = "flex flex-col gap-2" >
154
+ < img
155
+ src = {
156
+ row . original . user . image ||
157
+ `${ DICEBEAR_AVATAR_URL } ${ row . original . user . name } `
158
+ }
159
+ alt = { row . original . user . name }
160
+ className = "size-6 shrink-0 rounded-full"
161
+ />
162
+ < p className = "text-sm font-medium" >
163
+ { row . original . user . name }
164
+ </ p >
165
+ </ div >
166
+ ) }
167
+ < div className = "text-xs text-neutral-500" >
168
+ Paid at{ " " }
169
+ < span className = "font-medium text-neutral-700" >
170
+ { formatDateTime ( row . original . paidAt , {
171
+ month : "short" ,
172
+ day : "numeric" ,
173
+ year : "numeric" ,
174
+ hour : "numeric" ,
175
+ minute : "numeric" ,
176
+ } ) }
177
+ </ span >
178
+ </ div >
179
+ </ div >
180
+ }
181
+ >
182
+ < div className = "flex items-center gap-2" >
183
+ { row . original . user && (
184
+ < img
185
+ src = {
186
+ row . original . user . image ||
187
+ `${ DICEBEAR_AVATAR_URL } ${ row . original . user . name } `
188
+ }
189
+ alt = { row . original . user . name }
190
+ className = "size-5 shrink-0 rounded-full"
191
+ />
192
+ ) }
193
+ { formatDate ( row . original . paidAt , {
194
+ month : "short" ,
195
+ year : undefined ,
196
+ } ) }
197
+ </ div >
198
+ </ Tooltip >
199
+ ) : (
200
+ "-"
201
+ ) ,
150
202
} ,
151
203
{
152
204
id : "amount" ,
0 commit comments