Refactor ToastProvider and CabinetMaintenance to streamline showToast usage
This commit is contained in:
parent
2b940c3d43
commit
650a6dbdd0
@ -45,7 +45,7 @@ export const ToastProvider = ({ children }) => {
|
||||
}
|
||||
|
||||
return (
|
||||
<ToastContext.Provider value={{ showToast }}>
|
||||
<ToastContext.Provider value={ showToast }>
|
||||
{children}
|
||||
{toast.show && (
|
||||
<div
|
||||
|
@ -6,7 +6,7 @@ import { useToast } from "../hooks/useToast";
|
||||
|
||||
function CabinetMaintenace() {
|
||||
const navigate = useNavigate();
|
||||
const { showToast } = useToast();
|
||||
const showToast = useToast();
|
||||
const [operation, setOperation] = useState("");
|
||||
|
||||
const handleNext = () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user