File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,10 @@ import { useQuery } from "@tanstack/solid-query";
22import { createMemo , JSXElement , Show } from "solid-js" ;
33
44import { createEffectOn } from "../../../hooks/effects" ;
5+ import {
6+ prefetchAboutPage ,
7+ prefetchLeaderboardPage ,
8+ } from "../../../queries/prefetch" ;
59import { getServerConfigurationQueryOptions } from "../../../queries/server-configuration" ;
610import {
711 restartTestEvent ,
@@ -21,8 +25,6 @@ import { AnimeConditional } from "../../common/anime";
2125import { Button } from "../../common/Button" ;
2226import { NotificationBubble } from "../../common/NotificationBubble" ;
2327import { User } from "../../common/User" ;
24- import { prefetchAboutPage } from "../../pages/AboutPage" ;
25- import { prefetchLeaderboardPage } from "../../pages/leaderboard/LeaderboardPage" ;
2628import { AccountMenu } from "./AccountMenu" ;
2729import { AccountXpBar } from "./AccountXpBar" ;
2830
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import { useQuery } from "@tanstack/solid-query";
22import { For , JSXElement , Show } from "solid-js" ;
33
44import { getConfig } from "../../config/store" ;
5- import { queryClient } from "../../queries" ;
65import {
76 getContributorsQueryOptions ,
87 getSpeedHistogramQueryOptions ,
@@ -19,13 +18,6 @@ import { ChartJs } from "../common/ChartJs";
1918import { Fa } from "../common/Fa" ;
2019import { H2 , H3 } from "../common/Headers" ;
2120
22- export function prefetchAboutPage ( ) : void {
23- void queryClient . prefetchQuery ( getContributorsQueryOptions ( ) ) ;
24- void queryClient . prefetchQuery ( getSupportersQueryOptions ( ) ) ;
25- void queryClient . prefetchQuery ( getTypingStatsQueryOptions ( ) ) ;
26- void queryClient . prefetchQuery ( getSpeedHistogramQueryOptions ( ) ) ;
27- }
28-
2921export function AboutPage ( ) : JSXElement {
3022 const isOpen = ( ) => getActivePage ( ) === "about" ;
3123
Original file line number Diff line number Diff line change @@ -285,17 +285,3 @@ export function LeaderboardPage(): JSXElement {
285285 </ Show >
286286 ) ;
287287}
288-
289- export function prefetchLeaderboardPage ( ) : void {
290- void queryClient . prefetchQuery (
291- getLeaderboardQueryOptions ( {
292- type : "allTime" ,
293- mode : "time" ,
294- mode2 : "15" ,
295- language : "english" ,
296- friendsOnly : false ,
297- page : 0 ,
298- previous : false ,
299- } ) ,
300- ) ;
301- }
Original file line number Diff line number Diff line change 1+ import { queryClient } from "." ;
2+ import {
3+ getContributorsQueryOptions ,
4+ getSpeedHistogramQueryOptions ,
5+ getSupportersQueryOptions ,
6+ getTypingStatsQueryOptions ,
7+ } from "./public" ;
8+ import { getLeaderboardQueryOptions } from "./leaderboards" ;
9+
10+ export function prefetchAboutPage ( ) : void {
11+ void queryClient . prefetchQuery ( getContributorsQueryOptions ( ) ) ;
12+ void queryClient . prefetchQuery ( getSupportersQueryOptions ( ) ) ;
13+ void queryClient . prefetchQuery ( getTypingStatsQueryOptions ( ) ) ;
14+ void queryClient . prefetchQuery ( getSpeedHistogramQueryOptions ( ) ) ;
15+ }
16+
17+ export function prefetchLeaderboardPage ( ) : void {
18+ void queryClient . prefetchQuery (
19+ getLeaderboardQueryOptions ( {
20+ type : "allTime" ,
21+ mode : "time" ,
22+ mode2 : "15" ,
23+ language : "english" ,
24+ friendsOnly : false ,
25+ page : 0 ,
26+ previous : false ,
27+ } ) ,
28+ ) ;
29+ }
You can’t perform that action at this time.
0 commit comments