File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed
Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -275,9 +275,9 @@ export async function change(
275275 typeof nextPageLoadingMode === "object" &&
276276 nextPageLoadingMode . mode === "async"
277277 ) {
278- nextPageLoadingMode . beforeLoading ( ) ;
278+ nextPageLoadingMode . beforeLoading ?. ( ) ;
279279 void nextPage ?. loadingOptions ?. loadingPromise ( ) . then ( ( ) => {
280- nextPageLoadingMode . afterLoading ( ) ;
280+ nextPageLoadingMode . afterLoading ?. ( ) ;
281281 } ) ;
282282 }
283283
Original file line number Diff line number Diff line change @@ -1485,13 +1485,19 @@ export const page = new PageWithUrlParams({
14851485 element : qsr ( ".page.pageLeaderboards" ) ,
14861486 path : "/leaderboards" ,
14871487 urlParamsSchema : UrlParameterSchema ,
1488+ loadingOptions : {
1489+ style : "spinner" ,
1490+ loadingMode : ( ) => "sync" ,
1491+ loadingPromise : async ( ) => {
1492+ await ServerConfiguration . configurationPromise ;
1493+ } ,
1494+ } ,
14881495
14891496 afterHide : async ( ) : Promise < void > => {
14901497 Skeleton . remove ( "pageLeaderboards" ) ;
14911498 stopTimer ( ) ;
14921499 } ,
14931500 beforeShow : async ( options ) : Promise < void > => {
1494- await ServerConfiguration . configurationPromise ;
14951501 Skeleton . append ( "pageLeaderboards" , "main" ) ;
14961502 await updateValidDailyLeaderboards ( ) ;
14971503 await appendModeAndLanguageButtons ( ) ;
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export type LoadingOptions = {
3434 loadingMode : ( ) =>
3535 | "none"
3636 | "sync"
37- | { mode : "async" ; beforeLoading : ( ) => void ; afterLoading : ( ) => void } ;
37+ | { mode : "async" ; beforeLoading ? : ( ) => void ; afterLoading ? : ( ) => void } ;
3838 /**
3939 * When this promise resolves, the loading screen will be hidden.
4040 */
You can’t perform that action at this time.
0 commit comments