-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from ostyjs/update-deps
enhancements
- Loading branch information
Showing
15 changed files
with
173 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 0 additions & 11 deletions
11
templates/react-shadcn/src/features/zap/zap-modal/types/index.ts
This file was deleted.
Oops, something went wrong.
11 changes: 4 additions & 7 deletions
11
templates/react-shadcn/src/pages/home/example-components/login.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export { useLoginParam } from './use-login-param'; | ||
export { useLoginModalState } from './use-login-modal-state'; | ||
export { useZapModalState } from './use-zap-modal-state'; |
31 changes: 31 additions & 0 deletions
31
templates/react-shadcn/src/shared/hooks/use-login-modal-state/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { useStore } from '@/shared/store'; | ||
|
||
/** | ||
* Custom hook for managing the login modal state. | ||
* | ||
* @returns An object containing functions and state variables related to the login modal. | ||
*/ | ||
export const useLoginModalState = () => { | ||
const isLoginModalOpen = useStore((state) => state.isLoginModalOpen); | ||
const setIsLoginModalOpen = useStore((state) => state.setIsLoginModalOpen); | ||
|
||
const openLoginModal = () => { | ||
setIsLoginModalOpen(true); | ||
}; | ||
|
||
const closeLoginModal = () => { | ||
setIsLoginModalOpen(false); | ||
}; | ||
|
||
const toggleLoginModal = () => { | ||
setIsLoginModalOpen(!isLoginModalOpen); | ||
}; | ||
|
||
return { | ||
isLoginModalOpen, | ||
openLoginModal, | ||
closeLoginModal, | ||
setIsLoginModalOpen, | ||
toggleLoginModal, | ||
}; | ||
}; |
Oops, something went wrong.