Commit 3da1788
authored
refactor: clean-up unused imports & fix types errors (#100)
* refactor: remove debug log from useAppConfig hook
- Removed the console log statement for 'data' in the useAppConfig hook to clean up the code and improve performance.
* refactor: clean up index.tsx by removing commented-out code
- Removed commented-out PostHogProvider and related code to streamline the index.tsx file.
- Ensured the StrictMode wrapper is correctly applied around the QueryClientProvider and application components for better performance and debugging.
* refactor: clean up import statement in AuthGate.tsx
- Removed unnecessary comment from the import statement for useAppConfig to improve code clarity.
* refactor: simplify handleOnScrollChange function in App component
- Updated the handleOnScrollChange function to remove unnecessary parameters, enhancing code clarity and maintainability.
* chore: add TypeScript types for React and ReactDOM
- Added `@types/react` and `@types/react-dom` as devDependencies in package.json for improved TypeScript support.
- Updated yarn.lock to include the new type definitions and their dependencies.
* refactor: remove hover styles from dropdown menu button in Excalidraw overrides
- Eliminated hover background color styles for the dropdown menu button in the _excalidraw-overrides.scss file to streamline the CSS and improve maintainability.
* refactor: update AuthDialog component and styles
- Removed unnecessary comment from AuthDialog.scss to streamline the styles.
- Changed the type of `warningText` prop in AuthDialog from string to React.ReactNode for better flexibility in rendering content.
* refactor: reorganize imports and enhance MainMenu component
- Moved the import statements for AccountDialog and MainMenu.scss to improve code organization.
- Added spacing for better readability in the MainMenu.tsx file.
* feat: add default CSS variables for consistent styling
- Introduced a new _defaults.scss file to define CSS variables for slider and range track styles.
- Updated index.scss to include the new defaults for improved styling consistency across components.
* refactor: remove CSS variables from Range.scss for cleaner styling
- Eliminated default CSS variables for slider and range track styles from Range.scss to streamline the styling process.
- Added appearance property to the range input for improved cross-browser compatibility.
* refactor: clean up imports in TabContextMenu component
- Removed unused useState import from TabContextMenu.tsx to enhance code clarity and reduce unnecessary dependencies.
* refactor: improve tab title reference assignment in Tabs component
- Updated the ref assignment for tab titles to use a block statement for better readability and consistency in the Tabs.tsx file.
* refactor: enhance type safety in Collab component
- Updated the type casting for user_id in the Collab component to ensure proper type handling of SocketId, improving code reliability and clarity.
* refactor: update App and MainMenu components for settings management
- Removed unused state and handlers related to the SettingsDialog in App.tsx to streamline the component.
- Added state management and conditional rendering for SettingsDialog in MainMenu.tsx, enhancing user experience and functionality.
* refactor: introduce UserSettings type and update constants
- Added UserSettings interface in a new types.ts file to define user settings structure.
- Introduced DEFAULT_SETTINGS constant in constants.ts for default user settings.
- Updated imports in SettingsDialog and canvas files to reference the new constants and types, enhancing code organization and type safety.
* refactor: clean up App component by removing unused settings-related code
- Removed commented-out imports, state, and handlers related to SettingsDialog in App.tsx to streamline the component and improve code clarity.1 parent e26d47a commit 3da1788
File tree
20 files changed
+78
-86
lines changed- src/frontend
- src
- css
- hooks
- lib
- collab
- ui
20 files changed
+78
-86
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | 7 | | |
10 | 8 | | |
11 | 9 | | |
12 | 10 | | |
13 | 11 | | |
14 | 12 | | |
15 | | - | |
16 | | - | |
17 | 13 | | |
18 | 14 | | |
19 | 15 | | |
20 | 16 | | |
21 | 17 | | |
22 | 18 | | |
23 | | - | |
| 19 | + | |
24 | 20 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 21 | + | |
| 22 | + | |
29 | 23 | | |
30 | 24 | | |
31 | | - | |
| 25 | + | |
32 | 26 | | |
33 | 27 | | |
34 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
| |||
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
42 | | - | |
43 | 41 | | |
44 | 42 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 43 | + | |
51 | 44 | | |
52 | 45 | | |
53 | 46 | | |
| |||
84 | 77 | | |
85 | 78 | | |
86 | 79 | | |
87 | | - | |
88 | | - | |
89 | 80 | | |
90 | 81 | | |
91 | 82 | | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
| 83 | + | |
100 | 84 | | |
101 | 85 | | |
102 | 86 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| |||
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | 51 | | |
58 | 52 | | |
59 | 53 | | |
| |||
67 | 61 | | |
68 | 62 | | |
69 | 63 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | 64 | | |
76 | 65 | | |
77 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
0 commit comments