File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -9,13 +9,19 @@ import {
99  Skeleton , 
1010  Table , 
1111  Title , 
12+   Text , 
1213}  from  '@mantine/core' ; 
1314import  {  IconAlertCircle ,  IconAlertTriangle  }  from  '@tabler/icons-react' ; 
1415import  React ,  {  useEffect ,  useState  }  from  'react' ; 
1516import  {  GetInvoiceLinksResponse  }  from  '@common/types/stripe' ; 
1617import  {  notifications  }  from  '@mantine/notifications' ; 
1718import  {  useAuth  }  from  '@ui/components/AuthContext' ; 
1819import  pluralize  from  'pluralize' ; 
20+ import  dayjs  from  'dayjs' ; 
21+ 
22+ const  HumanFriendlyDate  =  ( {  date } : {  date : string  |  Date  } )  =>  { 
23+   return  < Text  size = "sm" > { dayjs ( date ) . format ( 'MMMM D, YYYY' ) } </ Text > ; 
24+ } ; 
1925
2026interface  StripeCurrentLinksPanelProps  { 
2127  getLinks : ( )  =>  Promise < GetInvoiceLinksResponse > ; 
@@ -82,7 +88,9 @@ export const StripeCurrentLinksPanel: React.FC<StripeCurrentLinksPanelProps> = (
8288          < NumberFormatter  prefix = "$"  value = { data . invoiceAmountUsd  /  100 }  thousandSeparator  /> 
8389        </ Table . Td > 
8490        < Table . Td > { data . userId . replace ( userData ! . email ! ,  'You' ) } </ Table . Td > 
85-         < Table . Td > { data . createdAt  ===  null  ? 'Unknown'  : data . createdAt } </ Table . Td > 
91+         < Table . Td > 
92+           { data . createdAt  ===  null  ? 'Unknown'  : HumanFriendlyDate ( {  date : data . createdAt  } ) } 
93+         </ Table . Td > 
8694        < Table . Td > 
8795          < CopyButton  value = { data . link } > 
8896            { ( {  copied,  copy } )  =>  ( 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments