From 0d7b641c1d503e8e88a431d068a3b3624ec4105d Mon Sep 17 00:00:00 2001 From: Jeroen Claassens Date: Sun, 16 May 2021 01:27:27 +0200 Subject: [PATCH] chore: fix eslint and ts issues --- .../ColorPicker/PickerDialog.tsx | 4 +-- src/pages/_app.tsx | 29 ------------------- src/utils/util.ts | 2 +- 3 files changed, 3 insertions(+), 32 deletions(-) diff --git a/src/components/presentational/ColorPicker/PickerDialog.tsx b/src/components/presentational/ColorPicker/PickerDialog.tsx index 7bfef9ab..f8d56140 100644 --- a/src/components/presentational/ColorPicker/PickerDialog.tsx +++ b/src/components/presentational/ColorPicker/PickerDialog.tsx @@ -38,9 +38,9 @@ const PickerDialog: FC = ({ value, onClick, onChange }) => { useEffect(() => { if (scrollLockRef.current === null) { - enableBodyScroll((scrollLockRef.current as unknown) as HTMLElement); + enableBodyScroll(scrollLockRef.current as unknown as HTMLElement); } else { - disableBodyScroll((scrollLockRef.current as unknown) as HTMLElement); + disableBodyScroll(scrollLockRef.current as unknown as HTMLElement); } return () => { diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 1acb4ae0..308d8721 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -126,32 +126,3 @@ const App: NextPage = ({ Component, pageProps }) => { }; export default App; - -declare global { - type DiscordMessageAvatars = Record & - Partial<{ - blue: string; - gray: string; - green: string; - orange: string; - red: string; - }>; - - type DiscordMessageProfile = Partial<{ - author: string; - avatar: string; - bot: boolean; - verified: boolean; - roleColor: string; - }>; - - interface Window { - $discordMessage: Partial<{ - avatars: DiscordMessageAvatars; - profiles: Record; - defaultTheme: string; - defaultMode: string; - defaultBackground: 'discord' | 'none'; - }>; - } -} diff --git a/src/utils/util.ts b/src/utils/util.ts index 126c465f..eafac1ac 100644 --- a/src/utils/util.ts +++ b/src/utils/util.ts @@ -174,7 +174,7 @@ export const handleResetKey = ( } else if (guildSettingsChanges) { Reflect.set(guildSettingsChanges, key, null); } else { - guildSettingsChanges = ({ [key]: null } as unknown) as typeof guildSettingsChanges; + guildSettingsChanges = { [key]: null } as unknown as typeof guildSettingsChanges; } setGuildSettingsChanges(guildSettingsChanges);