Skip to content

Commit a5f5d5e

Browse files
committed
refactor: remove grid, zen, and view mode toggle functions from MainMenu
- Eliminated handleGridToggle, handleZenModeToggle, and handleViewModeToggle functions to streamline the MainMenu component. - Removed associated menu items for toggling grid, zen, and view modes, simplifying the user interface.
1 parent fb032c3 commit a5f5d5e

File tree

1 file changed

+0
-53
lines changed

1 file changed

+0
-53
lines changed

src/frontend/src/ui/MainMenu.tsx

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -137,35 +137,6 @@ export const MainMenuConfig: React.FC<MainMenuConfigProps> = ({
137137
setShowAccountModal(true);
138138
};
139139

140-
const handleGridToggle = () => {
141-
if (!excalidrawAPI) return;
142-
const appState = excalidrawAPI.getAppState();
143-
appState.gridModeEnabled = !appState.gridModeEnabled;
144-
appState.gridSize = 20;
145-
appState.gridStep = 5;
146-
excalidrawAPI.updateScene({
147-
appState: appState
148-
});
149-
};
150-
151-
const handleZenModeToggle = () => {
152-
if (!excalidrawAPI) return;
153-
const appState = excalidrawAPI.getAppState();
154-
appState.zenModeEnabled = !appState.zenModeEnabled;
155-
excalidrawAPI.updateScene({
156-
appState: appState
157-
});
158-
};
159-
160-
const handleViewModeToggle = () => {
161-
if (!excalidrawAPI) return;
162-
const appState = excalidrawAPI.getAppState();
163-
appState.viewModeEnabled = !appState.viewModeEnabled;
164-
excalidrawAPI.updateScene({
165-
appState: appState
166-
});
167-
};
168-
169140
const handleLogout = async () => {
170141
capture('logout_clicked');
171142

@@ -302,30 +273,6 @@ export const MainMenuConfig: React.FC<MainMenuConfigProps> = ({
302273
Action Button
303274
</MainMenu.Item>
304275
</MainMenu.Group>
305-
306-
<MainMenu.Separator />
307-
308-
<MainMenu.Group title="View">
309-
<MainMenu.Item
310-
icon={<Grid2x2 />}
311-
onClick={handleGridToggle}
312-
>
313-
Toggle grid
314-
</MainMenu.Item>
315-
<MainMenu.Item
316-
icon={<Eye />}
317-
onClick={handleViewModeToggle}
318-
>
319-
View mode
320-
</MainMenu.Item>
321-
<MainMenu.Item
322-
icon={<Coffee />}
323-
onClick={handleZenModeToggle}
324-
>
325-
Zen mode
326-
</MainMenu.Item>
327-
328-
</MainMenu.Group>
329276

330277
<MainMenu.Separator />
331278

0 commit comments

Comments
 (0)