From 7af5815fa90fbec20699825ae430b347844f13d3 Mon Sep 17 00:00:00 2001 From: Aaron Date: Fri, 3 Jan 2025 22:14:27 +0800 Subject: [PATCH] fix(ui): fix typo (#3799) fix: shortcut typo --- packages/ui/src/hooks/useSearchShortcut.jsx | 4 ++-- packages/ui/src/layout/MainLayout/ViewHeader.jsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/ui/src/hooks/useSearchShortcut.jsx b/packages/ui/src/hooks/useSearchShortcut.jsx index fedff244c54..bbcc3149551 100644 --- a/packages/ui/src/hooks/useSearchShortcut.jsx +++ b/packages/ui/src/hooks/useSearchShortcut.jsx @@ -3,7 +3,7 @@ import { getOS } from '@/utils/genericHelper' const isMac = getOS() === 'macos' -const useSearchShorcut = (inputRef) => { +const useSearchShortcut = (inputRef) => { useEffect(() => { const component = inputRef.current @@ -32,4 +32,4 @@ const useSearchShorcut = (inputRef) => { }, [inputRef]) // Add inputRef to the dependency array to ensure the effect is re-applied if inputRef changes } -export default useSearchShorcut +export default useSearchShortcut diff --git a/packages/ui/src/layout/MainLayout/ViewHeader.jsx b/packages/ui/src/layout/MainLayout/ViewHeader.jsx index 91d4a8ff870..d6c10e81951 100644 --- a/packages/ui/src/layout/MainLayout/ViewHeader.jsx +++ b/packages/ui/src/layout/MainLayout/ViewHeader.jsx @@ -9,7 +9,7 @@ import { StyledFab } from '@/ui-component/button/StyledFab' // icons import { IconSearch, IconArrowLeft, IconEdit } from '@tabler/icons-react' -import useSearchShorcut from '@/hooks/useSearchShortcut' +import useSearchShortcut from '@/hooks/useSearchShortcut' import { getOS } from '@/utils/genericHelper' const os = getOS() @@ -32,7 +32,7 @@ const ViewHeader = ({ }) => { const theme = useTheme() const searchInputRef = useRef() - useSearchShorcut(searchInputRef) + useSearchShortcut(searchInputRef) return (