Skip to content

Commit

Permalink
Remove unnecessary lazy loading
Browse files Browse the repository at this point in the history
  • Loading branch information
choidabom committed Aug 26, 2024
1 parent 5dd28ba commit bc16e04
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions frontend/src/components/headers/DocumentHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ import VerticalSplitIcon from "@mui/icons-material/VerticalSplit";
import VisibilityIcon from "@mui/icons-material/Visibility";
import {
AppBar,
CircularProgress,
IconButton,
Paper,
Stack,
ToggleButton,
ToggleButtonGroup,
Toolbar,
Tooltip,
Tooltip
} from "@mui/material";
import { lazy, Suspense, useEffect } from "react";
import { useEffect } from "react";
import { useDispatch, useSelector } from "react-redux";
import { useNavigate } from "react-router-dom";
import { useUserPresence } from "../../hooks/useUserPresence";
Expand All @@ -22,8 +21,8 @@ import { selectWorkspace } from "../../store/workspaceSlice";
import DownloadMenu from "../common/DownloadMenu";
import ShareButton from "../common/ShareButton";
import ThemeButton from "../common/ThemeButton";
import UserPresenceList from "./UserPresenceList";

const UserPresenceList = lazy(() => import("./UserPresenceList"));
function DocumentHeader() {
const dispatch = useDispatch();
const navigate = useNavigate();
Expand Down Expand Up @@ -87,9 +86,7 @@ function DocumentHeader() {
<DownloadMenu />
</Stack>
<Stack direction="row" alignItems="center" gap={1}>
<Suspense fallback={<CircularProgress size={24} />}>
<UserPresenceList presenceList={presenceList} />
</Suspense>
<UserPresenceList presenceList={presenceList} />
{!editorState.shareRole && <ShareButton />}
<ThemeButton />
</Stack>
Expand Down

0 comments on commit bc16e04

Please sign in to comment.