Skip to content

Commit

Permalink
feat: implement dynamic imports for FileUpload components
Browse files Browse the repository at this point in the history
  • Loading branch information
atrincas committed Dec 18, 2024
1 parent be3da98 commit fddf926
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions client/src/containers/profile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import { useEffect, useMemo, useRef } from "react";

import dynamic from "next/dynamic";
import Link from "next/link";

import { useSetAtom } from "jotai";
Expand All @@ -10,8 +11,7 @@ import { useFeatureFlags } from "@/hooks/use-feature-flags";

import CustomProjects from "@/containers/profile/custom-projects";
import DeleteAccount from "@/containers/profile/delete-account";
import FileUpload, { TEMPLATE_FILES } from "@/containers/profile/file-upload";
import FileUploadDescription from "@/containers/profile/file-upload/description";
import { TEMPLATE_FILES } from "@/containers/profile/file-upload";
import ProfileSection from "@/containers/profile/profile-section";
import ProfileSidebar from "@/containers/profile/profile-sidebar";
import { intersectingAtom } from "@/containers/profile/store";
Expand All @@ -20,6 +20,11 @@ import UserDetails from "@/containers/profile/user-details";
import { ScrollArea } from "@/components/ui/scroll-area";
import { SidebarTrigger } from "@/components/ui/sidebar";

const FileUpload = dynamic(() => import("@/containers/profile/file-upload"));
const FileUploadDescription = dynamic(
() => import("@/containers/profile/file-upload/description"),
);

const sections = [
{
id: "my-details",
Expand Down

0 comments on commit fddf926

Please sign in to comment.