Skip to content

Commit 61b7e1c

Browse files
committed
refactor: clean up useless comments
1 parent 3da1788 commit 61b7e1c

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/frontend/src/pad/editors/HtmlEditor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const useHtmlEditor = (
3333
element: NonDeleted<ExcalidrawEmbeddableElement> | undefined,
3434
editorRef: React.RefObject<any>,
3535
excalidrawAPI?: any,
36-
isActive: boolean = true // New parameter to control if the hook is active
36+
isActive: boolean = true
3737
) => {
3838
// Always initialize these hooks regardless of isActive
3939
const [createNew, setCreateNew] = useState(false);

src/frontend/src/ui/MainMenu.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { LogOut, SquarePlus, LayoutDashboard, User, Text, Settings, Terminal, Fi
77
import md5 from 'crypto-js/md5';
88

99
// Components
10-
import SettingsDialog from './SettingsDialog'; // Added import
10+
import SettingsDialog from './SettingsDialog';
1111

1212
import { useLogout } from '../hooks/useLogout';
1313
import { useAuthStatus } from '../hooks/useAuthStatus';
@@ -135,7 +135,7 @@ export const MainMenuConfig: React.FC<MainMenuConfigProps> = ({
135135
setShowSettingsModal(true);
136136
};
137137

138-
const handleCloseSettingsModal = () => { // Added handler to close settings modal
138+
const handleCloseSettingsModal = () => {
139139
setShowSettingsModal(false);
140140
};
141141

@@ -151,7 +151,7 @@ export const MainMenuConfig: React.FC<MainMenuConfigProps> = ({
151151
const keycloakLogoutUrl = data.logout_url;
152152

153153
const createIframeLoader = (url: string, debugName: string): Promise<void> => {
154-
return new Promise<void>((resolve, reject) => { // Added reject for error handling
154+
return new Promise<void>((resolve, reject) => {
155155
const iframe = document.createElement("iframe");
156156
iframe.style.display = "none";
157157
iframe.src = url;
@@ -204,7 +204,7 @@ export const MainMenuConfig: React.FC<MainMenuConfigProps> = ({
204204
onClose={() => setShowAccountModal(false)}
205205
/>
206206
)}
207-
{showSettingsModal && ( // Added conditional rendering for SettingsDialog
207+
{showSettingsModal && (
208208
<SettingsDialog
209209
excalidrawAPI={excalidrawAPI}
210210
onClose={handleCloseSettingsModal}

src/frontend/src/ui/TabContextMenu.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ class TabActionManager implements ActionManager {
219219
onRename: (padId: string, newName: string) => void,
220220
onDelete: (padId: string) => void, // This is for deleteOwnedPad
221221
onUpdateSharingPolicy: (padId: string, policy: string) => void,
222-
onLeaveSharedPad: (padId: string) => void, // Moved before optional param
222+
onLeaveSharedPad: (padId: string) => void,
223223
sharingPolicy?: string
224224
) {
225225
this.padId = padId;
@@ -244,7 +244,7 @@ class TabActionManager implements ActionManager {
244244
console.debug('[pad.ws] User confirmed delete, calling onDelete');
245245
this.onDelete(this.padId); // Calls original onDelete for owned pads
246246
}
247-
} else if (action.name === 'leaveSharedPad') { // New action for leaving
247+
} else if (action.name === 'leaveSharedPad') {
248248
console.debug('[pad.ws] Attempting to leave shared pad:', this.padId, this.padName);
249249
if (window.confirm(`Are you sure you want to leave "${this.padName}"? This will remove it from your list of open pads.`)) {
250250
this.onLeaveSharedPad(this.padId); // Calls the new handler

src/frontend/src/ui/Tabs.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ interface TabsProps {
2020
createNewPadAsync: () => Promise<Tab | null | undefined>;
2121
renamePad: (args: { padId: string; newName: string }) => void;
2222
deletePad: (padId: string) => void;
23-
leaveSharedPad: (padId: string) => void; // Added prop
23+
leaveSharedPad: (padId: string) => void;
2424
updateSharingPolicy: (args: { padId: string; policy: string }) => void;
2525
selectTab: (tabId: string) => void;
2626
}
@@ -470,7 +470,7 @@ const Tabs: React.FC<TabsProps> = ({
470470
}
471471
deletePad(padId); // Calls the prop for deleting owned pad
472472
}}
473-
onLeaveSharedPad={(padId: string) => { // New prop for 'leaveSharedPad'
473+
onLeaveSharedPad={(padId: string) => {
474474
leaveSharedPad(padId); // Calls the prop for leaving shared pad
475475
}}
476476
onUpdateSharingPolicy={(padId: string, policy: string) => {

0 commit comments

Comments
 (0)