useSignOutModal
useSignOutModal
is a custom React hook that provides functionality for displaying sign-out confirmation modal.
Usage
import React from 'react';
import useSignOutModal from 'path/to/useSignOutModal';
import { SignOutConfirmation } from 'path/to/SignOutConfirmation';
const MyComponent: React.FC = () => {
const { open } = useSignOutModal();
const handleSignOut = () => {
// Open the sign-out confirmation modal
open({
componentProps: {
// You can pass props to customize the SignOutConfirmation component here
},
modalProps: {
// You can pass props to customize the modal behavior here
},
});
};
return (
<div>
<button onClick={handleSignOut}>Sign Out</button>
</div>
);
};
export default MyComponent;
Parameters
useSignOutModal
does not accept any parameters.
Returns
open
: A function that, when called, displays the sign-out confirmation modal.