File tree Expand file tree Collapse file tree 6 files changed +54
-54
lines changed
workerpools/workerpoolsTable Expand file tree Collapse file tree 6 files changed +54
-54
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,14 @@ export const columns: ColumnDef<App>[] = [
4949 ) ;
5050 } ,
5151 } ,
52+ {
53+ accessorKey : 'time' ,
54+ header : 'Time' ,
55+ cell : ( { row } ) => {
56+ const timestamp = row . original . timestamp ;
57+ return < div className = "min-w-18" > { formatElapsedTime ( timestamp ) } </ div > ;
58+ } ,
59+ } ,
5260 {
5361 accessorKey : 'tx_hash' ,
5462 header : 'TxHash' ,
@@ -64,12 +72,4 @@ export const columns: ColumnDef<App>[] = [
6472 ) ;
6573 } ,
6674 } ,
67- {
68- accessorKey : 'time' ,
69- header : 'Time' ,
70- cell : ( { row } ) => {
71- const timestamp = row . original . timestamp ;
72- return < div className = "min-w-32" > { formatElapsedTime ( timestamp ) } </ div > ;
73- } ,
74- } ,
7575] ;
Original file line number Diff line number Diff line change @@ -51,6 +51,14 @@ export const columns: ColumnDef<Dataset>[] = [
5151 ) ;
5252 } ,
5353 } ,
54+ {
55+ accessorKey : 'time' ,
56+ header : 'Time' ,
57+ cell : ( { row } ) => {
58+ const timestamp = row . original . timestamp ;
59+ return < div className = "min-w-18" > { formatElapsedTime ( timestamp ) } </ div > ;
60+ } ,
61+ } ,
5462 {
5563 accessorKey : 'tx_hash' ,
5664 header : 'TxHash' ,
@@ -66,12 +74,4 @@ export const columns: ColumnDef<Dataset>[] = [
6674 ) ;
6775 } ,
6876 } ,
69- {
70- accessorKey : 'time' ,
71- header : 'Time' ,
72- cell : ( { row } ) => {
73- const timestamp = row . original . timestamp ;
74- return < div className = "min-w-32" > { formatElapsedTime ( timestamp ) } </ div > ;
75- } ,
76- } ,
7777] ;
Original file line number Diff line number Diff line change @@ -40,14 +40,6 @@ export const columns: ColumnDef<Deal>[] = [
4040 ) ;
4141 } ,
4242 } ,
43- {
44- accessorKey : 'time' ,
45- header : 'Time' ,
46- cell : ( { row } ) => {
47- const timestamp = row . original . timestamp ;
48- return < div className = "min-w-32" > { formatElapsedTime ( timestamp ) } </ div > ;
49- } ,
50- } ,
5143 {
5244 accessorKey : 'workerpool.address' ,
5345 header : 'Workerpool' ,
@@ -81,6 +73,21 @@ export const columns: ColumnDef<Deal>[] = [
8173 ) ;
8274 } ,
8375 } ,
76+ {
77+ accessorKey : 'time' ,
78+ header : 'Time' ,
79+ cell : ( { row } ) => {
80+ const timestamp = row . original . timestamp ;
81+ return < div className = "min-w-18" > { formatElapsedTime ( timestamp ) } </ div > ;
82+ } ,
83+ } ,
84+ {
85+ accessorKey : 'success' ,
86+ header : 'Success' ,
87+ cell : ( { row } ) => {
88+ return < SuccessCell deal = { row . original } /> ;
89+ } ,
90+ } ,
8491 {
8592 accessorKey : 'price' ,
8693 header : 'Price' ,
@@ -96,11 +103,4 @@ export const columns: ColumnDef<Deal>[] = [
96103 return < span > { price } xRLC</ span > ;
97104 } ,
98105 } ,
99- {
100- accessorKey : 'success' ,
101- header : 'Success' ,
102- cell : ( { row } ) => {
103- return < SuccessCell deal = { row . original } /> ;
104- } ,
105- } ,
106106] ;
Original file line number Diff line number Diff line change @@ -22,20 +22,6 @@ export const columns: ColumnDef<Task>[] = [
2222 ) ;
2323 } ,
2424 } ,
25- {
26- accessorKey : 'deadline' ,
27- header : 'Deadline' ,
28- cell : ( { row } ) => {
29- const deadline = new Intl . DateTimeFormat ( 'en-US' , {
30- day : '2-digit' ,
31- month : '2-digit' ,
32- year : 'numeric' ,
33- hour : '2-digit' ,
34- minute : '2-digit' ,
35- } ) . format ( new Date ( row . original . finalDeadline * 1000 ) ) ;
36- return deadline ;
37- } ,
38- } ,
3925 {
4026 accessorKey : 'workerpool.address' ,
4127 header : 'Status' ,
@@ -51,4 +37,18 @@ export const columns: ColumnDef<Task>[] = [
5137 ) ;
5238 } ,
5339 } ,
40+ {
41+ accessorKey : 'deadline' ,
42+ header : 'Deadline' ,
43+ cell : ( { row } ) => {
44+ const deadline = new Intl . DateTimeFormat ( 'en-US' , {
45+ day : '2-digit' ,
46+ month : '2-digit' ,
47+ year : 'numeric' ,
48+ hour : '2-digit' ,
49+ minute : '2-digit' ,
50+ } ) . format ( new Date ( row . original . finalDeadline * 1000 ) ) ;
51+ return deadline ;
52+ } ,
53+ } ,
5454] ;
Original file line number Diff line number Diff line change @@ -52,6 +52,14 @@ export const columns: ColumnDef<Workerpool>[] = [
5252 ) ;
5353 } ,
5454 } ,
55+ {
56+ accessorKey : 'time' ,
57+ header : 'Time' ,
58+ cell : ( { row } ) => {
59+ const timestamp = row . original . timestamp ;
60+ return < div className = "min-w-18" > { formatElapsedTime ( timestamp ) } </ div > ;
61+ } ,
62+ } ,
5563 {
5664 accessorKey : 'txHash' ,
5765 header : 'TxHash' ,
@@ -67,12 +75,4 @@ export const columns: ColumnDef<Workerpool>[] = [
6775 ) ;
6876 } ,
6977 } ,
70- {
71- accessorKey : 'dataset.address' ,
72- header : 'Dataset' ,
73- cell : ( { row } ) => {
74- const timestamp = row . original . timestamp ;
75- return < div className = "min-w-32" > { formatElapsedTime ( timestamp ) } </ div > ;
76- } ,
77- } ,
7878] ;
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export function formatElapsedTime(timestamp: string | number): string {
2020 }
2121
2222 if ( elapsedTime / 1000 < 60 ) {
23- return 'a few seconds ago ' ;
23+ return 'just now ' ;
2424 }
2525 if ( elapsedTime / 1000 / 60 < 60 ) {
2626 return ( elapsedTime / 1000 / 60 ) . toFixed ( 0 ) + 'min ago' ;
You can’t perform that action at this time.
0 commit comments