diff options
| author | Factiven <[email protected]> | 2023-09-26 23:35:35 +0700 |
|---|---|---|
| committer | Factiven <[email protected]> | 2023-09-26 23:35:35 +0700 |
| commit | 20b8a7267827e3a07c1eef668c3b9c22fda43765 (patch) | |
| tree | 2fec9006dfac5737d8b227bf5ccce73880800cc2 /lib/hooks/isOpenState.js | |
| parent | Update release.md (diff) | |
| download | moopa-4.1.2.tar.xz moopa-4.1.2.zip | |
Update v4.1.2v4.1.2
Diffstat (limited to 'lib/hooks/isOpenState.js')
| -rw-r--r-- | lib/hooks/isOpenState.js | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/lib/hooks/isOpenState.js b/lib/hooks/isOpenState.js deleted file mode 100644 index 6aade61..0000000 --- a/lib/hooks/isOpenState.js +++ /dev/null @@ -1,17 +0,0 @@ -import React, { createContext, useContext, useState } from "react"; - -const SearchContext = createContext(); - -export const SearchProvider = ({ children }) => { - const [isOpen, setIsOpen] = useState(false); - - return ( - <SearchContext.Provider value={{ isOpen, setIsOpen }}> - {children} - </SearchContext.Provider> - ); -}; - -export function useSearch() { - return useContext(SearchContext); -} |