mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
success toast after upload
This commit is contained in:
@@ -14,7 +14,6 @@ import AuthenticatedRouting from 'AuthenticatedRouting';
|
|||||||
|
|
||||||
interface SecurityRedirectProps {
|
interface SecurityRedirectProps {
|
||||||
message: string;
|
message: string;
|
||||||
// variant?: VariantType;
|
|
||||||
signOut?: boolean;
|
signOut?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -22,8 +21,7 @@ const RootRedirect: FC<SecurityRedirectProps> = ({ message, signOut }) => {
|
|||||||
const authenticationContext = useContext(AuthenticationContext);
|
const authenticationContext = useContext(AuthenticationContext);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
signOut && authenticationContext.signOut(false);
|
signOut && authenticationContext.signOut(false);
|
||||||
// TODO toast variant
|
toast.success(message);
|
||||||
toast.error(message);
|
|
||||||
}, [message, signOut, authenticationContext]);
|
}, [message, signOut, authenticationContext]);
|
||||||
return <Navigate to="/" />;
|
return <Navigate to="/" />;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user