@@ -37,7 +37,6 @@ export async function loader({ request, params }: LoaderFunctionArgs) {
3737 } ) ;
3838
3939 const scenarioId = fromParams ( params , 'scenarioId' ) ;
40- console . log ( scenarioId ) ;
4140
4241 const url = new URL ( request . url ) ;
4342
@@ -80,24 +79,20 @@ export async function loader({ request, params }: LoaderFunctionArgs) {
8079 try {
8180 const obj = JSON . parse ( atob ( q ) ) ;
8281 const safe = qSchema . safeParse ( obj ) ;
83- console . log ( 'safe' , safe ) ;
8482 if ( safe . success ) {
8583 parsed = { range : safe . data . range , compareRange : safe . data . compareRange ?? null } ;
8684 }
8785 } catch {
8886 // fallthrough: parsed stays null
8987 }
9088 }
91- console . log ( 'parsed' , parsed ) ;
9289
9390 if ( ! parsed ) {
9491 const now = new Date ( ) ;
9592 now . setUTCHours ( 0 , 0 , 0 , 0 ) ;
9693 const startDefault = subMonths ( now , 1 ) ;
9794 startDefault . setUTCHours ( 0 , 0 , 0 , 0 ) ;
9895
99- console . log ( 'startDefault' , startDefault . toISOString ( ) ) ;
100- console . log ( 'now' , now . toISOString ( ) ) ;
10196 return redirectWithQ ( {
10297 range : { start : startDefault . toISOString ( ) , end : now . toISOString ( ) } ,
10398 compareRange : null ,
0 commit comments