@@ -7,7 +7,7 @@ import { CaseReview } from '@app-builder/models/cases';
77import { useAddReviewToCaseCommentsMutation } from '@app-builder/queries/add-review-to-case-comments' ;
88import { useCaseReviewFeedbackMutation } from '@app-builder/queries/case-review-feedback' ;
99import { type loader } from '@app-builder/routes/_builder+/cases+/$caseId+/_index' ;
10- import { formatDateTimeWithoutPresets , useFormatLanguage } from '@app-builder/utils/format' ;
10+ import { useFormatDateTimeString } from '@app-builder/utils/format' ;
1111import { useLoaderData , useRevalidator } from '@remix-run/react' ;
1212import { cva } from 'class-variance-authority' ;
1313import { useRef , useState } from 'react' ;
@@ -53,7 +53,8 @@ export const CaseDetails = ({
5353} ) => {
5454 const { case : detail , inboxes, reports } = useLoaderData < typeof loader > ( ) ;
5555 const { t } = useTranslation ( [ 'common' , 'cases' ] ) ;
56- const language = useFormatLanguage ( ) ;
56+ const formatDateTime = useFormatDateTimeString ( ) ;
57+
5758 const sentinelRef = useRef < HTMLDivElement > ( null ) ;
5859 const containerRef = useRef < HTMLDivElement > ( null ) ;
5960 const intersection = useIntersection ( sentinelRef , {
@@ -142,8 +143,7 @@ export const CaseDetails = ({
142143 { detail . snoozedUntil ? (
143144 < span className = "font-medium text-grey-00" >
144145 { t ( 'cases:case.snoozed_until' , {
145- date : formatDateTimeWithoutPresets ( detail . snoozedUntil , {
146- language,
146+ date : formatDateTime ( detail . snoozedUntil , {
147147 dateStyle : 'short' ,
148148 } ) ,
149149 } ) }
@@ -154,8 +154,7 @@ export const CaseDetails = ({
154154 < div className = "grid grid-cols-[170px_1fr] items-center" >
155155 < span className = "text-grey-50 font-normal" > { t ( 'cases:creation_date' ) } </ span >
156156 < time className = "font-medium" dateTime = { detail . createdAt } >
157- { formatDateTimeWithoutPresets ( detail . createdAt , {
158- language,
157+ { formatDateTime ( detail . createdAt , {
159158 dateStyle : 'short' ,
160159 } ) }
161160 </ time >
0 commit comments