mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-15 10:04:44 +00:00
9 lines
264 B
TypeScript
9 lines
264 B
TypeScript
import { useEffect } from 'react';
|
|
import { showErrorToast } from '../../../components/ui/toast/toast';
|
|
|
|
export const useActionErrorToast = (error: string | undefined | null) => {
|
|
useEffect(() => {
|
|
if (error) showErrorToast(error);
|
|
}, [error]);
|
|
};
|