-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: contact modal does not show up correctly on mobile
Signed-off-by: GitHub <[email protected]>
- Loading branch information
1 parent
6996702
commit 06a2069
Showing
8 changed files
with
120 additions
and
143 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,23 @@ | ||
import { useAppDispatch, useAppSelector } from "@/redux/hooks/AppStoreHooks"; | ||
import { | ||
closeDialog, | ||
openDialog, | ||
toggleDialog, | ||
} from "@/redux/slice/ContactMailSlice"; | ||
import { setOpenDialog, toggleDialog } from "@/redux/slice/ContactMailSlice"; | ||
import { useCallback } from "react"; | ||
|
||
export const useContactMail = () => { | ||
const state = useAppSelector((state) => state.contactMail); | ||
const dispatch = useAppDispatch(); | ||
const open = useCallback(() => { | ||
dispatch(openDialog()); | ||
}, [dispatch]); | ||
const close = useCallback(() => { | ||
dispatch(closeDialog()); | ||
}, [dispatch]); | ||
const toggle = useCallback(() => { | ||
dispatch(toggleDialog()); | ||
}, [dispatch]); | ||
const setOpen = useCallback( | ||
(value: boolean) => { | ||
dispatch(setOpenDialog(value)); | ||
}, | ||
[dispatch], | ||
); | ||
|
||
return { | ||
open, | ||
close, | ||
toggle, | ||
setOpen, | ||
isOpen: state.dialogOpen, | ||
}; | ||
}; |
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