dynamic import some components to make the bundle size smaller
All checks were successful
deploy / deploy (push) Successful in 54s

This commit is contained in:
Lee
2023-10-23 08:07:47 +01:00
parent b2c9ff412b
commit 86cfa7686f
7 changed files with 24 additions and 12 deletions

View File

@ -3,13 +3,15 @@ import { ScoresaberPlayerScore } from "@/schemas/scoresaber/playerScore";
import { useSettingsStore } from "@/store/settingsStore";
import { SortType, SortTypes } from "@/types/SortTypes";
import { ScoreSaberAPI } from "@/utils/scoresaber/api";
import dynamic from "next/dynamic";
import { useRouter } from "next/navigation";
import { useCallback, useEffect, useState } from "react";
import Card from "../Card";
import Pagination from "../Pagination";
import { Spinner } from "../Spinner";
import Score from "./Score";
const Spinner = dynamic(() => import("@/components/Spinner"));
type PageInfo = {
loading: boolean;
page: number;