Skip to content

Commit

Permalink
fix: cleanup ESLint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
heypoom committed Dec 17, 2023
1 parent c20f10f commit 35407c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions canvas/src/canvas/components/SlashCommand.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ export function SlashCommand() {
const destroy = useCallback(() => {
window.removeEventListener("mousemove", onMouseMove)
listening.current = false
}, [])
}, [onMouseMove])

const register = useCallback(() => {
window.addEventListener("mousemove", onMouseMove)
listening.current = true
}, [])
}, [onMouseMove])

useEffect(() => {
if (listening.current) return
Expand All @@ -56,7 +56,7 @@ export function SlashCommand() {
return () => {
destroy()
}
}, [active])
}, [active, destroy, register])

const command = useMemo(() => matches[selected], [matches, selected])
const argsValid = useMemo(() => isArgsValid(input, command), [input, command])
Expand Down
3 changes: 1 addition & 2 deletions canvas/src/persist/hooks/useSaveState.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { BlockData } from "machine-wasm"
import { useMemo } from "react"
import { useReactFlow } from "reactflow"

import { defaultProps } from "@/blocks"
Expand Down Expand Up @@ -102,5 +101,5 @@ export function useSaveState(): SaveStateContext {
engine.ctx?.clear()
}

return useMemo(() => ({ serialize, restore, clear }), [])
return { serialize, restore, clear }
}

0 comments on commit 35407c3

Please sign in to comment.