Browse Source

chore: address linter warnings

pull/3235/head
Gabe Kangas 2 years ago
parent
commit
243156b307
No known key found for this signature in database
GPG Key ID: 4345B2060657F330
  1. 9
      web/components/admin/MainLayout.tsx
  2. 4
      web/components/chat/ChatModerationDetailsModal/ChatModerationDetailsModal.tsx
  3. 2
      web/pages/_document.tsx
  4. 11
      web/pages/embed/video/index.tsx

9
web/components/admin/MainLayout.tsx

@ -284,10 +284,11 @@ export const MainLayout: FC<MainLayoutProps> = ({ children }) => {
}; };
useEffect(() => { useEffect(() => {
menuItems.forEach(item => menuItems.forEach(
item?.children?.forEach(child => { item =>
if (child?.key === route) setOpenKeys([...openMenuItems, item.key]); item?.children?.forEach(child => {
}), if (child?.key === route) setOpenKeys([...openMenuItems, item.key]);
}),
); );
}, []); }, []);

4
web/components/chat/ChatModerationDetailsModal/ChatModerationDetailsModal.tsx

@ -162,9 +162,7 @@ export const ChatModerationDetailsModal: FC<ChatModerationDetailsModalProps> = (
> >
<Spin spinning={loading}> <Spin spinning={loading}>
<UserColorBlock color={displayColor} /> <UserColorBlock color={displayColor} />
{scopes?.map(scope => ( {scopes?.map(scope => <Tag key={scope}>{scope}</Tag>)}
<Tag key={scope}>{scope}</Tag>
))}
{authenticated && <Tag>Authenticated</Tag>} {authenticated && <Tag>Authenticated</Tag>}
{isBot && <Tag>Bot</Tag>} {isBot && <Tag>Bot</Tag>}
<ValueRow label="Messages Sent Across Clients" value={totalMessagesSent.toString()} /> <ValueRow label="Messages Sent Across Clients" value={totalMessagesSent.toString()} />

2
web/pages/_document.tsx

@ -1,7 +1,7 @@
/* eslint-disable react/no-danger */ /* eslint-disable react/no-danger */
import { Html, Head, Main, NextScript } from 'next/document';
import { readFileSync } from 'fs'; import { readFileSync } from 'fs';
import { join } from 'path'; import { join } from 'path';
import { Html, Head, Main, NextScript } from 'next/document';
class InlineStylesHead extends Head { class InlineStylesHead extends Head {
getCssLinks: Head['getCssLinks'] = ({ allFiles }) => { getCssLinks: Head['getCssLinks'] = ({ allFiles }) => {

11
web/pages/embed/video/index.tsx

@ -39,10 +39,13 @@ export default function VideoEmbed() {
* query parameters ourselves * query parameters ourselves
*/ */
const path = router.asPath.split('?')[1] ?? ''; const path = router.asPath.split('?')[1] ?? '';
const query = path.split('&').reduce((currQuery, part) => { const query = path.split('&').reduce(
const [key, value] = part.split('='); (currQuery, part) => {
return { ...currQuery, [key]: value }; const [key, value] = part.split('=');
}, {} as Record<string, string>); return { ...currQuery, [key]: value };
},
{} as Record<string, string>,
);
const initiallyMuted = query.initiallyMuted === 'true'; const initiallyMuted = query.initiallyMuted === 'true';

Loading…
Cancel
Save