Remove lazy loading (#415)

This commit is contained in:
Luke Vella 2023-01-20 13:35:27 +00:00 committed by GitHub
parent 5d4a6b26aa
commit c70f618b15
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

View file

@ -10,10 +10,10 @@ import Table from "../../icons/table.svg";
import { useModal } from "../../modal";
import TimeZonePicker from "../../time-zone-picker";
import { PollFormProps } from "../types";
import MonthCalendar from "./month-calendar";
import { DateTimeOption } from "./types";
const WeekCalendar = React.lazy(() => import("./week-calendar"));
const MonthCalendar = React.lazy(() => import("./month-calendar"));
export type PollOptionsData = {
navigationDate: string; // used to navigate to the right part of the calendar

View file

@ -9,8 +9,11 @@ import toast from "react-hot-toast";
import { useMount } from "react-use";
import { Button } from "@/components/button";
import Discussion from "@/components/discussion";
import LockClosed from "@/components/icons/lock-closed.svg";
import Share from "@/components/icons/share.svg";
import DesktopPoll from "@/components/poll/desktop-poll";
import MobilePoll from "@/components/poll/mobile-poll";
import { preventWidows } from "@/utils/prevent-widows";
import { trpc } from "../utils/trpc";
@ -28,11 +31,6 @@ import { usePoll } from "./poll-context";
import { useSession } from "./session";
import Sharing from "./sharing";
const Discussion = React.lazy(() => import("@/components/discussion"));
const DesktopPoll = React.lazy(() => import("@/components/poll/desktop-poll"));
const MobilePoll = React.lazy(() => import("@/components/poll/mobile-poll"));
const PollPage: NextPage = () => {
const { poll, urlId, admin } = usePoll();
const { participants } = useParticipants();