import { useContext } from 'react' ; import { ToastContext } from './ToastContext' ; export const useToast = ( ) => { const { showToast , hideToast } = useContext ( ToastContext ) ; return { showToast , hideToast } ; } ;