mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
chore: enable no-unused vars (#2181)
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
import type { AffineWorkspace } from '@affine/workspace/type';
|
||||
|
||||
export function useAffinePublicPage(workspace: AffineWorkspace) {}
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user