chore: enable no-unused vars (#2181)

This commit is contained in:
Himself65
2023-04-28 00:41:06 -05:00
committed by GitHub
parent b6ca2aa063
commit 70fbbb39c1
70 changed files with 206 additions and 225 deletions

View File

@@ -13,7 +13,7 @@ export const Content = styled('div')({
padding: '0 40px',
});
export const ContentTitle = styled('h1')(({ theme }) => {
export const ContentTitle = styled('h1')(() => {
return {
fontSize: 'var(--affine-font-h6)',
lineHeight: '28px',
@@ -21,7 +21,7 @@ export const ContentTitle = styled('h1')(({ theme }) => {
};
});
export const StyleTips = styled('div')(({ theme }) => {
export const StyleTips = styled('div')(() => {
return {
userSelect: 'none',
margin: '20px 0',
@@ -31,7 +31,7 @@ export const StyleTips = styled('div')(({ theme }) => {
};
});
export const StyleButton = styled(Button)(({ theme }) => {
export const StyleButton = styled(Button)(() => {
return {
textAlign: 'center',
margin: '20px 0',

View File

@@ -150,7 +150,7 @@ const InviteBox = styled('div')({
position: 'relative',
});
const Members = styled('div')(({ theme }) => {
const Members = styled('div')(() => {
return {
position: 'absolute',
width: '100%',
@@ -178,7 +178,7 @@ const Members = styled('div')(({ theme }) => {
// };
// });
const Member = styled('div')(({ theme }) => {
const Member = styled('div')(() => {
return {
color: 'var(--affine-icon-color)',
fontSize: 'var(--affine-font-sm)',
@@ -188,7 +188,7 @@ const Member = styled('div')(({ theme }) => {
};
});
const MemberIcon = styled('div')(({ theme }) => {
const MemberIcon = styled('div')(() => {
return {
width: '40px',
height: '40px',

View File

@@ -61,7 +61,7 @@ export const StyledMemberInfo = styled('div')(() => {
};
});
export const StyledMemberName = styled('div')(({ theme }) => {
export const StyledMemberName = styled('div')(() => {
return {
fontWeight: '400',
fontSize: '18px',
@@ -70,7 +70,7 @@ export const StyledMemberName = styled('div')(({ theme }) => {
};
});
export const StyledMemberEmail = styled('div')(({ theme }) => {
export const StyledMemberEmail = styled('div')(() => {
return {
fontWeight: '400',
fontSize: '16px',

View File

@@ -1,6 +1,6 @@
import { styled } from '@affine/component';
export const StyledModalWrapper = styled('div')(({ theme }) => {
export const StyledModalWrapper = styled('div')(() => {
return {
position: 'relative',
padding: '0px',
@@ -36,7 +36,7 @@ export const StyledTextContent = styled('div')(() => {
};
});
export const StyledInputContent = styled('div')(({ theme }) => {
export const StyledInputContent = styled('div')(() => {
return {
display: 'flex',
flexDirection: 'row',

View File

@@ -1,6 +1,6 @@
import { styled } from '@affine/component';
export const StyledModalWrapper = styled('div')(({ theme }) => {
export const StyledModalWrapper = styled('div')(() => {
return {
position: 'relative',
padding: '0px',

View File

@@ -1,7 +1,7 @@
import { displayFlex, styled } from '@affine/component';
import { Input } from '@affine/component';
export const StyledInput = styled(Input)(({ theme }) => {
export const StyledInput = styled(Input)(() => {
return {
border: '1px solid var(--affine-border-color)',
borderRadius: '10px',
@@ -9,7 +9,7 @@ export const StyledInput = styled(Input)(({ theme }) => {
};
});
export const StyledWorkspaceInfo = styled('div')(({ theme }) => {
export const StyledWorkspaceInfo = styled('div')(() => {
return {
...displayFlex('flex-start', 'center'),
fontSize: '20px',
@@ -48,7 +48,7 @@ export const StyledAvatar = styled('div')(
}
);
export const StyledEditButton = styled('div')(({ theme }) => {
export const StyledEditButton = styled('div')(() => {
return {
color: 'var(--affine-primary-color)',
cursor: 'pointer',

View File

@@ -9,7 +9,7 @@ import { useCurrentUser } from '../../../../../hooks/current/use-current-user';
import { WorkspaceAvatar } from '../../../../pure/footer';
import type { PanelProps } from '../../index';
export const StyledWorkspaceName = styled('span')(({ theme }) => {
export const StyledWorkspaceName = styled('span')(() => {
return {
fontWeight: '400',
fontSize: 'var(--affine-font-h6)',

View File

@@ -26,7 +26,7 @@ export const StyledSettingContent = styled('div')(() => {
});
export const WorkspaceSettingTagItem = styled('li')<{ isActive?: boolean }>(
({ theme, isActive }) => {
({ isActive }) => {
{
return {
display: 'flex',
@@ -45,7 +45,7 @@ export const WorkspaceSettingTagItem = styled('li')<{ isActive?: boolean }>(
}
);
export const StyledSettingKey = styled('div')(({ theme }) => {
export const StyledSettingKey = styled('div')(() => {
return {
width: '140px',
fontSize: 'var(--affine-font-base)',
@@ -60,14 +60,14 @@ export const StyledRow = styled(FlexWrapper)(() => {
};
});
export const StyledWorkspaceName = styled('span')(({ theme }) => {
export const StyledWorkspaceName = styled('span')(() => {
return {
fontWeight: '400',
fontSize: 'var(--affine-font-h6)',
};
});
export const StyledIndicator = styled('div')(({ theme }) => {
export const StyledIndicator = styled('div')(() => {
return {
height: '2px',
background: 'var(--affine-primary-color)',

View File

@@ -38,7 +38,6 @@ export type OperationCellProps = {
export const OperationCell: React.FC<OperationCellProps> = ({
pageMeta,
metas,
blockSuiteWorkspace,
onOpenPageInNewTab,
onToggleFavoritePage,

View File

@@ -12,7 +12,7 @@ export const StyledTableContainer = styled('div')(({ theme }) => {
},
};
});
export const StyledTitleWrapper = styled('div')(({ theme }) => {
export const StyledTitleWrapper = styled('div')(() => {
return {
...displayFlex('flex-start', 'center'),
a: {
@@ -26,7 +26,7 @@ export const StyledTitleWrapper = styled('div')(({ theme }) => {
},
};
});
export const StyledTitleLink = styled('div')(({ theme }) => {
export const StyledTitleLink = styled('div')(() => {
return {
maxWidth: '80%',
marginRight: '18px',

View File

@@ -3,7 +3,7 @@ import { displayFlex, styled } from '@affine/component';
export const StyledEditorModeSwitch = styled('div')<{
switchLeft: boolean;
showAlone?: boolean;
}>(({ theme, switchLeft, showAlone }) => {
}>(({ switchLeft, showAlone }) => {
return {
width: showAlone ? '40px' : '78px',
height: '32px',

View File

@@ -26,7 +26,7 @@ export default EditPage;
const StyledEditPageButton = styled(
TextButton,
{}
)(({ theme }) => {
)(() => {
return {
border: '1px solid var(--affine-primary-color)',
color: 'var(--affine-primary-color)',

View File

@@ -76,12 +76,12 @@ const LocalHeaderShareMenu: React.FC<BaseHeaderProps> = props => {
},
[helper]
)}
togglePagePublic={useCallback(async (page, isPublic) => {
togglePagePublic={useCallback(async () => {
// local workspace should not have public page
throw new Error('unreachable');
}, [])}
toggleWorkspacePublish={useCallback(
async (workspace, publish) => {
async workspace => {
assertEquals(workspace.flavour, WorkspaceFlavour.LOCAL);
assertEquals(workspace.id, props.workspace.id);
await helper.jumpToSubPath(workspace.id, WorkspaceSubPath.SETTING);

View File

@@ -23,7 +23,7 @@ import { affineAuth } from '../../../../plugins/affine';
import type { AffineOfficialWorkspace } from '../../../../shared';
import { TransformWorkspaceToAffineModal } from '../../../affine/transform-workspace-to-affine-modal';
const IconWrapper = styled('div')(({ theme }) => {
const IconWrapper = styled('div')(() => {
return {
width: '32px',
height: '32px',

View File

@@ -4,7 +4,7 @@ import spring, { toString } from 'css-spring';
const ANIMATE_DURATION = 400;
export const StyledThemeModeSwitch = styled('button')(({ theme }) => {
export const StyledThemeModeSwitch = styled('button')(() => {
return {
width: '32px',
height: '32px',
@@ -20,7 +20,7 @@ export const StyledThemeModeSwitch = styled('button')(({ theme }) => {
export const StyledSwitchItem = styled('div')<{
active: boolean;
isHover: boolean;
}>(({ active, isHover, theme }) => {
}>(({ active, isHover }) => {
const activeRaiseAnimate = toString(
spring({ top: '0' }, { top: '-100%' }, { preset: 'gentle' })
);

View File

@@ -106,19 +106,19 @@ const HeaderRightItems: Record<HeaderRightItemName, HeaderItem> = {
},
[HeaderRightItemName.ShareMenu]: {
Component: HeaderShareMenu,
availableWhen: (workspace, currentPage, { isPublic, isPreview }) => {
availableWhen: (workspace, currentPage) => {
return workspace.flavour !== WorkspaceFlavour.PUBLIC && !!currentPage;
},
},
[HeaderRightItemName.EditPage]: {
Component: EditPage,
availableWhen: (workspace, currentPage, { isPublic, isPreview }) => {
availableWhen: (workspace, currentPage, { isPublic }) => {
return isPublic;
},
},
[HeaderRightItemName.UserAvatar]: {
Component: UserAvatar,
availableWhen: (workspace, currentPage, { isPublic, isPreview }) => {
availableWhen: (workspace, currentPage, { isPublic }) => {
return isPublic;
},
},

View File

@@ -23,22 +23,20 @@ export const StyledHeaderContainer = styled('div')<{
},
};
});
export const StyledHeader = styled('div')<{ hasWarning: boolean }>(
({ theme }) => {
return {
flexShrink: 0,
height: '52px',
width: '100%',
padding: '0 20px',
...displayFlex('space-between', 'center'),
background: 'var(--affine-background-primary-color)',
zIndex: 99,
position: 'relative',
};
}
);
export const StyledHeader = styled('div')<{ hasWarning: boolean }>(() => {
return {
flexShrink: 0,
height: '52px',
width: '100%',
padding: '0 20px',
...displayFlex('space-between', 'center'),
background: 'var(--affine-background-primary-color)',
zIndex: 99,
position: 'relative',
};
});
export const StyledTitleContainer = styled('div')(({ theme }) => ({
export const StyledTitleContainer = styled('div')(() => ({
width: '100%',
height: '100%',
@@ -82,7 +80,7 @@ export const StyledHeaderRightSide = styled('div')({
});
export const StyledBrowserWarning = styled('div')<{ show: boolean }>(
({ theme, show }) => {
({ show }) => {
return {
backgroundColor: 'var(--affine-background-warning-color)',
color: 'var(--affine-background-warning-color)',
@@ -95,7 +93,7 @@ export const StyledBrowserWarning = styled('div')<{ show: boolean }>(
}
);
export const StyledCloseButton = styled('div')(({ theme }) => {
export const StyledCloseButton = styled('div')(() => {
return {
width: '36px',
height: '36px',
@@ -137,7 +135,7 @@ export const StyledSearchArrowWrapper = styled('div')(() => {
};
});
export const StyledPageListTittleWrapper = styled(StyledTitle)(({ theme }) => {
export const StyledPageListTittleWrapper = styled(StyledTitle)(() => {
return {
fontSize: 'var(--affine-font-base)',
color: 'var(--affine-text-primary-color)',
@@ -148,7 +146,7 @@ export const StyledPageListTittleWrapper = styled(StyledTitle)(({ theme }) => {
},
};
});
export const StyledQuickSearchTipButton = styled('div')(({ theme }) => {
export const StyledQuickSearchTipButton = styled('div')(() => {
return {
...displayFlex('center', 'center'),
marginTop: '12px',

View File

@@ -6,7 +6,7 @@ import {
} from '@affine/component';
import { Button } from '@affine/component';
export const StyledSplitLine = styled('div')(({ theme }) => {
export const StyledSplitLine = styled('div')(() => {
return {
width: '1px',
height: '20px',
@@ -15,7 +15,7 @@ export const StyledSplitLine = styled('div')(({ theme }) => {
};
});
export const StyleWorkspaceInfo = styled('div')(({ theme }) => {
export const StyleWorkspaceInfo = styled('div')(() => {
return {
marginLeft: '15px',
width: '202px',
@@ -36,7 +36,7 @@ export const StyleWorkspaceInfo = styled('div')(({ theme }) => {
};
});
export const StyleWorkspaceTitle = styled('div')(({ theme }) => {
export const StyleWorkspaceTitle = styled('div')(() => {
return {
fontSize: 'var(--affine-font-base)',
fontWeight: 600,
@@ -54,7 +54,7 @@ export const StyledFooter = styled('div')({
...displayFlex('space-between', 'center'),
});
export const StyleUserInfo = styled('div')(({ theme }) => {
export const StyleUserInfo = styled('div')(() => {
return {
textAlign: 'left',
marginLeft: '16px',
@@ -73,14 +73,14 @@ export const StyleUserInfo = styled('div')(({ theme }) => {
export const StyledModalHeaderLeft = styled('div')(() => {
return { ...displayFlex('flex-start', 'center') };
});
export const StyledModalTitle = styled('div')(({ theme }) => {
export const StyledModalTitle = styled('div')(() => {
return {
fontWeight: 600,
fontSize: 'var(--affine-font-h6)',
};
});
export const StyledHelperContainer = styled('div')(({ theme }) => {
export const StyledHelperContainer = styled('div')(() => {
return {
color: 'var(--affine-icon-color)',
marginLeft: '15px',
@@ -128,7 +128,7 @@ export const StyledModalHeader = styled('div')(() => {
};
});
export const StyledSignInButton = styled(Button)(({ theme }) => {
export const StyledSignInButton = styled(Button)(() => {
return {
fontWeight: 600,
paddingLeft: 0,

View File

@@ -2,7 +2,7 @@ import { displayFlex, positionAbsolute, styled } from '@affine/component';
export const StyledIsland = styled('div')<{
spread: boolean;
}>(({ theme, spread }) => {
}>(({ spread }) => {
return {
transition: 'box-shadow 0.2s',
width: '44px',
@@ -31,7 +31,7 @@ export const StyledIsland = styled('div')<{
},
};
});
export const StyledIconWrapper = styled('div')(({ theme }) => {
export const StyledIconWrapper = styled('div')(() => {
return {
color: 'var(--affine-icon-color)',
...displayFlex('center', 'center'),
@@ -57,7 +57,7 @@ export const StyledAnimateWrapper = styled('div')(() => ({
export const StyledTriggerWrapper = styled('div')<{
spread?: boolean;
}>(({ theme, spread }) => {
}>(({ spread }) => {
return {
width: '36px',
height: '36px',

View File

@@ -3,7 +3,7 @@ import { IconButton } from '@affine/component';
import { styled } from '@affine/component';
import { ArrowDownSmallIcon } from '@blocksuite/icons';
const StyledIconButtonWithAnimate = styled(IconButton)(({ theme }) => {
const StyledIconButtonWithAnimate = styled(IconButton)(() => {
return {
svg: {
transition: 'transform 0.15s ease-in-out',

View File

@@ -1,6 +1,6 @@
import { displayFlex, styled, textEllipsis } from '@affine/component';
export const StyledNavigationPathContainer = styled('div')(({ theme }) => {
export const StyledNavigationPathContainer = styled('div')(() => {
return {
height: '46px',
...displayFlex('flex-start', 'center'),
@@ -24,7 +24,7 @@ export const StyledNavigationPathContainer = styled('div')(({ theme }) => {
});
export const StyledNavPathLink = styled('div')<{ active?: boolean }>(
({ theme, active }) => {
({ active }) => {
return {
color: active
? 'var(--affine-text-primary-color)'
@@ -45,7 +45,7 @@ export const StyledNavPathLink = styled('div')<{ active?: boolean }>(
);
export const StyledNavPathExtendContainer = styled('div')<{ show: boolean }>(
({ show, theme }) => {
({ show }) => {
return {
position: 'absolute',
left: '0',

View File

@@ -1,6 +1,6 @@
import { displayFlex, styled, textEllipsis } from '@affine/component';
export const StyledContent = styled('div')(({ theme }) => {
export const StyledContent = styled('div')(() => {
return {
minHeight: '290px',
maxHeight: '70vh',
@@ -35,7 +35,7 @@ export const StyledContent = styled('div')(({ theme }) => {
},
};
});
export const StyledJumpTo = styled('div')(({ theme }) => {
export const StyledJumpTo = styled('div')(() => {
return {
...displayFlex('center', 'start'),
flexDirection: 'column',
@@ -47,7 +47,7 @@ export const StyledJumpTo = styled('div')(({ theme }) => {
},
};
});
export const StyledNotFound = styled('div')(({ theme }) => {
export const StyledNotFound = styled('div')(() => {
return {
width: '612px',
...displayFlex('center', 'center'),
@@ -68,7 +68,7 @@ export const StyledNotFound = styled('div')(({ theme }) => {
},
};
});
export const StyledInputContent = styled('div')(({ theme }) => {
export const StyledInputContent = styled('div')(() => {
return {
...displayFlex('space-between', 'center'),
input: {
@@ -85,7 +85,7 @@ export const StyledInputContent = styled('div')(({ theme }) => {
},
};
});
export const StyledShortcut = styled('div')(({ theme }) => {
export const StyledShortcut = styled('div')(() => {
return {
color: 'var(--affine-placeholder-color)',
fontSize: 'var(--affine-font-sm)',
@@ -93,7 +93,7 @@ export const StyledShortcut = styled('div')(({ theme }) => {
};
});
export const StyledLabel = styled('label')(({ theme }) => {
export const StyledLabel = styled('label')(() => {
return {
width: '20px',
height: '20px',
@@ -109,7 +109,7 @@ export const StyledModalHeader = styled('div')(() => {
...displayFlex('space-between', 'center'),
};
});
export const StyledModalDivider = styled('div')(({ theme }) => {
export const StyledModalDivider = styled('div')(() => {
return {
width: 'auto',
height: '0',
@@ -118,7 +118,7 @@ export const StyledModalDivider = styled('div')(({ theme }) => {
};
});
export const StyledModalFooter = styled('div')(({ theme }) => {
export const StyledModalFooter = styled('div')(() => {
return {
fontSize: 'inherit',
lineHeight: '22px',
@@ -142,7 +142,7 @@ export const StyledModalFooter = styled('div')(({ theme }) => {
},
};
});
export const StyledModalFooterContent = styled('button')(({ theme }) => {
export const StyledModalFooterContent = styled('button')(() => {
return {
width: '600px',
height: '32px',

View File

@@ -1,6 +1,6 @@
import { displayFlex, styled } from '@affine/component';
export const StyledShortcutsModal = styled('div')(({ theme }) => ({
export const StyledShortcutsModal = styled('div')(() => ({
width: '288px',
height: '74vh',
paddingBottom: '28px',
@@ -16,7 +16,7 @@ export const StyledShortcutsModal = styled('div')(({ theme }) => ({
margin: 'auto',
zIndex: 'var(--affine-z-index-modal)',
}));
export const StyledTitle = styled('div')(({ theme }) => ({
export const StyledTitle = styled('div')(() => ({
color: 'var(--affine-text-primary-color)',
fontWeight: '500',
fontSize: 'var(--affine-font-sm)',
@@ -28,7 +28,7 @@ export const StyledTitle = styled('div')(({ theme }) => ({
color: 'var(--affine-primary-color)',
},
}));
export const StyledSubTitle = styled('div')(({ theme }) => ({
export const StyledSubTitle = styled('div')(() => ({
fontWeight: '500',
fontSize: 'var(--affine-font-sm)',
height: '34px',
@@ -49,7 +49,7 @@ export const StyledModalHeader = styled('div')(() => ({
transition: 'background-color 0.5s',
}));
export const StyledListItem = styled('div')(({ theme }) => ({
export const StyledListItem = styled('div')(() => ({
height: '34px',
...displayFlex('space-between', 'center'),
fontSize: 'var(--affine-font-sm)',

View File

@@ -56,7 +56,7 @@ export const LanguageMenu: React.FC = () => {
);
};
const ListItem = styled(MenuItem)(({ theme }) => ({
const ListItem = styled(MenuItem)(() => ({
height: '38px',
fontSize: 'var(--affine-font-base)',
textTransform: 'capitalize',

View File

@@ -1,6 +1,6 @@
import { displayFlex, styled, textEllipsis } from '@affine/component';
export const StyledSplitLine = styled('div')(({ theme }) => {
export const StyledSplitLine = styled('div')(() => {
return {
width: '1px',
height: '20px',
@@ -9,7 +9,7 @@ export const StyledSplitLine = styled('div')(({ theme }) => {
};
});
export const StyleWorkspaceInfo = styled('div')(({ theme }) => {
export const StyleWorkspaceInfo = styled('div')(() => {
return {
marginLeft: '15px',
width: '202px',
@@ -30,7 +30,7 @@ export const StyleWorkspaceInfo = styled('div')(({ theme }) => {
};
});
export const StyleWorkspaceTitle = styled('div')(({ theme }) => {
export const StyleWorkspaceTitle = styled('div')(() => {
return {
fontSize: 'var(--affine-font-base)',
fontWeight: 600,
@@ -41,7 +41,7 @@ export const StyleWorkspaceTitle = styled('div')(({ theme }) => {
};
});
export const StyledCreateWorkspaceCard = styled('div')(({ theme }) => {
export const StyledCreateWorkspaceCard = styled('div')(() => {
return {
width: '310px',
height: '124px',
@@ -68,14 +68,14 @@ export const StyledCreateWorkspaceCard = styled('div')(({ theme }) => {
export const StyledModalHeaderLeft = styled('div')(() => {
return { ...displayFlex('flex-start', 'center') };
});
export const StyledModalTitle = styled('div')(({ theme }) => {
export const StyledModalTitle = styled('div')(() => {
return {
fontWeight: 600,
fontSize: 'var(--affine-font-h6)',
};
});
export const StyledHelperContainer = styled('div')(({ theme }) => {
export const StyledHelperContainer = styled('div')(() => {
return {
color: 'var(--affine-icon-color)',
marginLeft: '15px',

View File

@@ -1,6 +1,6 @@
import { displayFlex, textEllipsis } from '@affine/component';
import { styled } from '@affine/component';
export const StyledSelectorContainer = styled('div')(({ theme }) => {
export const StyledSelectorContainer = styled('div')(() => {
return {
height: '58px',
display: 'flex',
@@ -32,7 +32,7 @@ export const StyledWorkspaceName = styled('div')(() => {
};
});
export const StyledWorkspaceStatus = styled('div')(({ theme }) => {
export const StyledWorkspaceStatus = styled('div')(() => {
return {
height: '22px',
...displayFlex('flex-start', 'center'),

View File

@@ -37,7 +37,7 @@ export const StyledLink = styled(Link)(() => {
'-webkit-app-region': 'no-drag',
};
});
export const StyledNewPageButton = styled('button')(({ theme }) => {
export const StyledNewPageButton = styled('button')(() => {
return {
height: '52px',
...displayFlex('flex-start', 'center'),
@@ -56,7 +56,7 @@ export const StyledNewPageButton = styled('button')(({ theme }) => {
};
});
export const StyledSliderModalBackground = styled('div')<{ active: boolean }>(
({ theme, active }) => {
({ active }) => {
return {
transition: 'opacity .15s',
pointerEvents: active ? 'auto' : 'none',
@@ -74,7 +74,7 @@ export const StyledSliderModalBackground = styled('div')<{ active: boolean }>(
export const StyledScrollWrapper = styled('div')<{
showTopBorder: boolean;
}>(({ showTopBorder, theme }) => {
}>(({ showTopBorder }) => {
return {
maxHeight: '50%',
overflowY: 'auto',

View File

@@ -310,7 +310,6 @@ describe('useIsFirstLoad', () => {
});
test('useTipsDisplayStatus', async () => {
const tipsDisplayStatus = renderHook(() => useTipsDisplayStatus());
const setTipsDisplayStatus = tipsDisplayStatus.result.current;
expect(tipsDisplayStatus.result.current).toEqual({
quickSearchTips: {
permanentlyHidden: true,

View File

@@ -1,3 +0,0 @@
import type { AffineWorkspace } from '@affine/workspace/type';
export function useAffinePublicPage(workspace: AffineWorkspace) {}

View File

@@ -86,14 +86,14 @@ export const useElementResizeEffect = (
element: Element | null,
fn: () => void | (() => () => void),
// TODO: add throttle
throttle = 0
_throttle = 0
) => {
useEffect(() => {
if (!element) {
return;
}
let dispose: void | (() => void);
const resizeObserver = new ResizeObserver(entries => {
const resizeObserver = new ResizeObserver(() => {
dispose = fn();
});
resizeObserver.observe(element);

View File

@@ -77,7 +77,7 @@ export const StyledToolWrapper = styled('div')(({ theme }) => {
});
export const StyledSliderResizer = styled('div')<{ isResizing: boolean }>(
({ theme }) => {
() => {
return {
position: 'absolute',
top: 0,

View File

@@ -89,7 +89,7 @@ InvitePage.getLayout = page => {
);
};
const StyledContainer = styled('div')(({ theme }) => {
const StyledContainer = styled('div')(() => {
return {
height: '100vh',
...displayFlex('center', 'center'),

View File

@@ -27,7 +27,7 @@ import {
} from '../../../layouts/public-workspace-layout';
import type { NextPageWithLayout } from '../../../shared';
export const NavContainer = styled('div')(({ theme }) => {
export const NavContainer = styled('div')(() => {
return {
width: '100vw',
height: '52px',
@@ -36,7 +36,7 @@ export const NavContainer = styled('div')(({ theme }) => {
};
});
export const StyledBreadcrumbs = styled(Link)(({ theme }) => {
export const StyledBreadcrumbs = styled(Link)(() => {
return {
flex: 1,
...displayFlex('center', 'center'),

View File

@@ -14,7 +14,7 @@ const affineApis = {} as ReturnType<typeof createUserApis> &
Object.assign(affineApis, createUserApis(prefixUrl));
Object.assign(affineApis, createWorkspaceApis(prefixUrl));
const debugLogger = new DebugLogger('affine-debug-apis');
const _debugLogger = new DebugLogger('affine-debug-apis');
if (!globalThis.AFFINE_APIS) {
globalThis.AFFINE_APIS = affineApis;