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