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

@@ -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);