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'
66
77dayjs . extend ( utc )
88
99export 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' )
1111}
1212
1313export function cn ( ...inputs : ClassValue [ ] ) {
@@ -16,7 +16,7 @@ export function cn(...inputs: ClassValue[]) {
1616
1717export function limitText ( text : string , length : number ) {
1818 if ( text . length > length ) {
19- return text . slice ( 0 , length ) . trim ( ) + " ..."
19+ return text . slice ( 0 , length ) . trim ( ) + ' ...'
2020 }
2121 return text
2222}
@@ -25,14 +25,14 @@ export function formatReturnValue(task: TaskSelect) {
2525 if ( task . returnValue ?. return_value ) {
2626 return task . returnValue . return_value
2727 } else {
28- return " null"
28+ return ' null'
2929 }
3030}
3131
3232// temporarily, while dishka hasn't fixed it's module naming bug
3333export function formatTaskName ( taskName : string ) {
34- if ( taskName . includes ( ":" ) ) {
35- const parts = taskName . split ( ":" )
34+ if ( taskName . includes ( ':' ) ) {
35+ const parts = taskName . split ( ':' )
3636 return parts [ parts . length - 1 ]
3737 } else {
3838 return taskName
0 commit comments