Skip to content

Commit

Permalink
chore: fix eslint and ts issues
Browse files Browse the repository at this point in the history
  • Loading branch information
favna committed May 15, 2021
1 parent 155813f commit 0d7b641
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 32 deletions.
4 changes: 2 additions & 2 deletions src/components/presentational/ColorPicker/PickerDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ const PickerDialog: FC<PickerDialogProps> = ({ 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 () => {
Expand Down
29 changes: 0 additions & 29 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,32 +126,3 @@ const App: NextPage<AppProps> = ({ Component, pageProps }) => {
};

export default App;

declare global {
type DiscordMessageAvatars = Record<string, string> &
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<string, DiscordMessageProfile>;
defaultTheme: string;
defaultMode: string;
defaultBackground: 'discord' | 'none';
}>;
}
}
2 changes: 1 addition & 1 deletion src/utils/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0d7b641

Please sign in to comment.