feat: add sign out and book a call buttons to "Choose your plan" page (#5292)
Resolves #5281 <img width="399" alt="buttions-light" src="https://github.com/twentyhq/twenty/assets/16918891/d1a0ba4e-696e-476b-a792-01ae19a06a55"> <img width="390" alt="buttons-dark" src="https://github.com/twentyhq/twenty/assets/16918891/40bea83b-bc32-45ea-a522-ecf8239cfe51">
This commit is contained in:
@ -0,0 +1,15 @@
|
||||
import { useCallback } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
import { useAuth } from '@/auth/hooks/useAuth';
|
||||
import { AppPath } from '@/types/AppPath';
|
||||
|
||||
export const useSignOutAndRedirect = () => {
|
||||
const { signOut } = useAuth();
|
||||
const navigate = useNavigate();
|
||||
|
||||
return useCallback(() => {
|
||||
signOut();
|
||||
navigate(AppPath.SignInUp);
|
||||
}, [signOut, navigate]);
|
||||
};
|
||||
Reference in New Issue
Block a user