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 (
|
return (
|
||||||
<ToastContext.Provider value={{ showToast }}>
|
<ToastContext.Provider value={ showToast }>
|
||||||
{children}
|
{children}
|
||||||
{toast.show && (
|
{toast.show && (
|
||||||
<div
|
<div
|
||||||
|
@ -6,7 +6,7 @@ import { useToast } from "../hooks/useToast";
|
|||||||
|
|
||||||
function CabinetMaintenace() {
|
function CabinetMaintenace() {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const { showToast } = useToast();
|
const showToast = useToast();
|
||||||
const [operation, setOperation] = useState("");
|
const [operation, setOperation] = useState("");
|
||||||
|
|
||||||
const handleNext = () => {
|
const handleNext = () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user