Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

Remove lazy loading (#415)

Luke Vellac70f618b1591
diff --git a/src/components/forms/poll-options-form/poll-options-form.tsx b/src/components/forms/poll-options-form/poll-options-form.tsx
index 4a24d8642..220101aa6 100644
--- a/src/components/forms/poll-options-form/poll-options-form.tsx
+++ b/src/components/forms/poll-options-form/poll-options-form.tsx
@@ -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
diff --git a/src/components/poll.tsx b/src/components/poll.tsx
index c284806f1..8781a946c 100644
--- a/src/components/poll.tsx
+++ b/src/components/poll.tsx
@@ -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();