From d364f5f67692f734ea1d7e25b7e3bfadf1a9becf Mon Sep 17 00:00:00 2001 From: Peterson Rodrigues dos Santos Date: Tue, 24 Feb 2026 20:56:47 -0300 Subject: [PATCH] peterson-implement-error-message-toast --- .../UserProfile/UserProfileModal/EditLinkModal.jsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/components/UserProfile/UserProfileModal/EditLinkModal.jsx b/src/components/UserProfile/UserProfileModal/EditLinkModal.jsx index 7c8a46e1bb..c8ed256aa6 100644 --- a/src/components/UserProfile/UserProfileModal/EditLinkModal.jsx +++ b/src/components/UserProfile/UserProfileModal/EditLinkModal.jsx @@ -15,6 +15,7 @@ import styles from './EditLinkModal.module.css'; import { boxStyle, boxStyleDark } from '~/styles'; import { connect, useSelector } from 'react-redux'; import { isValidGoogleDocsUrl, isValidMediaUrl } from '~/utils/checkValidURL'; +import { toast } from 'react-toastify'; const EditLinkModal = props => { const darkMode = useSelector(state => state.theme.darkMode) @@ -95,6 +96,7 @@ const EditLinkModal = props => { !isValidUrl(newLink.Link) ) { setIsValidLink(false); + toast.error('Please enter valid URLs for each link.'); } else { const newLinks = [...links, { Name: newLink.Name, Link: newLink.Link }]; setLinks(newLinks); @@ -160,6 +162,7 @@ const EditLinkModal = props => { closeModal(); } else { setIsValidLink(false); + toast.error('Please enter valid URLs for each link.'); } }; @@ -383,11 +386,6 @@ const EditLinkModal = props => { - {!isValidLink && ( -

- Please enter valid URLs for each link. -

- )}