File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -150,8 +150,10 @@ const PizzaMakerStation = () => {
150150 < div
151151 key = { `${ order . _id . toString ( ) } -${ item . item . _id . toString ( ) } -${ item . status } -${ index } ` }
152152 className = { `border px-3 py-1 rounded-lg text-sm flex items-center justify-between ${ item . status !== ITEM_STATUSES . PREPPING ? 'bg-green-50 border-green-100 text-gray-400' : '' } ` } >
153- { item . item . name } < span
154- className = "bg-gray-100 py-0.5 px-1 rounded-2xl" > { timeslotToLocalTime ( order . timeslot ) } </ span >
153+ { item . item . name }
154+ < span className = "bg-gray-100 py-0.5 px-1 rounded-2xl" >
155+ { timeslotToLocalTime ( order . timeslot ) }
156+ </ span >
155157 </ div > )
156158 ) }
157159 </ >
Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ const OrderSummary: React.FC<OrderSummaryPageProps> = ({
115115 < div className = "flex justify-between text-sm text-gray-700 mt-2" >
116116 < span > { t ( 'cart.timeslot.title' ) } </ span >
117117 < span >
118- { timeslotToLocalTime ( order . timeslot ) }
118+ { order . timeslot ? timeslotToLocalTime ( order . timeslot ) : "" }
119119 </ span >
120120 </ div >
121121 </ div >
Original file line number Diff line number Diff line change @@ -70,10 +70,7 @@ export const timeslotToDate = (timeslot: string): Date => {
7070}
7171
7272
73- export const timeslotToLocalTime = ( timeslot : string | null ) => {
74- if ( ! timeslot ) {
75- return null ;
76- }
73+ export const timeslotToLocalTime = ( timeslot : string ) :string => {
7774 // Use a fixed date to avoid date boundary issues
7875 const utcDate = new Date ( `1970-01-01T${ timeslot } :00Z` ) ;
7976 const userTimezone = Intl . DateTimeFormat ( ) . resolvedOptions ( ) . timeZone ;
You can’t perform that action at this time.
0 commit comments