Japan Airlines Credit Card

New Website Announcement Social Media Post

we re excited to announce the launch of our new website social how to build a new website new website announcement website launch 7 tips for announcing a new website succeeding small 6 simple website launch announcement ideas graphics new website announcement template how to announce a new website launch with social media post examples elegant minimalist announcement for new website social media post website launch announcement instagram post design template free 12 best new website announcement ideas new website announcement how to market your website on instagram before you launch website website launch announcement piktochart 6 simple website launch announcement ideas graphics instagram post 12 best new website announcement ideas new website announcement how to announce a new website launch with social media post examples premium psd social media post template megaphone announcement 7 creative ways to broadcast your new website blue compass how to announce your new website launch in style seattle new media how to announce your new website launch in style seattle new media how to announce a new website launch with social media post examples website redesign announcement premium vector give away announcement instagram banner social media coming soon announcement social media post design poster flyer template 6 simple website launch announcement ideas graphics design an announcement post for your social media by farzanbahadur fiverr premium psd social media announcement post design 33 product launch social media posts examples announcement post psd high quality free psd templates for download premium psd social media announcement post 15 new website announcement strategies to boost in 2022 how to write a new website announcement email 5 new website announcement email examples planning steps tips website launch announcement 14 ways for a successful website launch social media announcement post design premium psd how to create a website launch marketing plan seedprod new website announcement template

:
Birthday Card Making Kit
Include validation for webId
1 parent Journal Documents Examples commit 764a078

7 tips for announcing a new website succeeding small 1 file changed How Tp Post Something About Need In Help

Lines changed: 23 additions & 5 deletions

Physical Newspaper Articles About Writing New Website Announcement Social Media Post

src/components/Modals/AddContactModal.jsx

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// React Imports
22
import React, { useState } from 'react';
3+
// Inrupt Imports
4+
import { getWebIdDataset } from '@inrupt/solid-client';
35
// Material UI Imports
46
import Box from '@mui/material/Box';
57
import Button from '@mui/material/Button';
@@ -58,6 +60,13 @@ const AddContactModal = ({ addContact, showAddContactModal, setShowAddContactMod
5860
setWebId(renderedWebId);
5961
};
6062

63+
const clearInputFields = () => {
64+
setUserGivenName('');
65+
setUserFamilyName('');
66+
setUsername('');
67+
setWebId('');
68+
};
69+
6170
const handleAddContact = async (event) => {
6271
event.preventDefault();
6372
setProcessing(true);
@@ -68,6 +77,15 @@ const AddContactModal = ({ addContact, showAddContactModal, setShowAddContactMod
6877
webId: addWebId.value.trim()
6978
};
7079

80+
// Validation for webId
81+
try {
82+
await getWebIdDataset(userObject.webId);
83+
} catch {
84+
addNotification('error', `Add contact failed. Reason: ${userObject.webId} does not exist`);
85+
setProcessing(false);
86+
return;
87+
}
88+
7189
try {
7290
await addContact(userObject);
7391
addNotification(
@@ -77,10 +95,7 @@ const AddContactModal = ({ addContact, showAddContactModal, setShowAddContactMod
7795
} catch (e) {
7896
addNotification('error', `Add contact failed. Reason: ${e.message}`);
7997
} finally {
80-
setUserGivenName('');
81-
setUserFamilyName('');
82-
setUsername('');
83-
setWebId('');
98+
clearInputFields();
8499
setShowAddContactModal(false);
85100
setProcessing(false);
86101
}
@@ -167,7 +182,10 @@ const AddContactModal = ({ addContact, showAddContactModal, setShowAddContactMod
167182
variant="outlined"
168183
color="error"
169184
endIcon={<ClearIcon />}
170-
onClick={() => setShowAddContactModal(false)}
185+
onClick={() => {
186+
clearInputFields();
187+
setShowAddContactModal(false);
188+
}}
171189
fullWidth
172190
>
173191
Cancel

Inspiration Stories For Boys New Website Announcement Social Media Post

Comments
 (0)