1
- import dayjs from " dayjs"
2
- import utc from " dayjs/plugin/utc"
3
- import { type ClassValue , clsx } from " clsx"
4
- import { twMerge } from " tailwind-merge"
5
- import type { TaskSelect } from " ~/server/db/schema"
1
+ import dayjs from ' dayjs'
2
+ import utc from ' dayjs/plugin/utc.js'
3
+ import { type ClassValue , clsx } from ' clsx'
4
+ import { twMerge } from ' tailwind-merge'
5
+ import type { TaskSelect } from ' ~/server/db/schema'
6
6
7
7
dayjs . extend ( utc )
8
8
9
9
export function formatDate ( date : string ) {
10
- return dayjs . utc ( date ) . local ( ) . format ( " MMM D, YYYY hh:mm A" )
10
+ return dayjs . utc ( date ) . local ( ) . format ( ' MMM D, YYYY hh:mm A' )
11
11
}
12
12
13
13
export function cn ( ...inputs : ClassValue [ ] ) {
@@ -16,7 +16,7 @@ export function cn(...inputs: ClassValue[]) {
16
16
17
17
export function limitText ( text : string , length : number ) {
18
18
if ( text . length > length ) {
19
- return text . slice ( 0 , length ) . trim ( ) + " ..."
19
+ return text . slice ( 0 , length ) . trim ( ) + ' ...'
20
20
}
21
21
return text
22
22
}
@@ -25,14 +25,14 @@ export function formatReturnValue(task: TaskSelect) {
25
25
if ( task . returnValue ?. return_value ) {
26
26
return task . returnValue . return_value
27
27
} else {
28
- return " null"
28
+ return ' null'
29
29
}
30
30
}
31
31
32
32
// temporarily, while dishka hasn't fixed it's module naming bug
33
33
export function formatTaskName ( taskName : string ) {
34
- if ( taskName . includes ( ":" ) ) {
35
- const parts = taskName . split ( ":" )
34
+ if ( taskName . includes ( ':' ) ) {
35
+ const parts = taskName . split ( ':' )
36
36
return parts [ parts . length - 1 ]
37
37
} else {
38
38
return taskName
0 commit comments