diff --git a/frontend/react-material-admin/src/pages/makesqueak/MakeSqueak.js b/frontend/react-material-admin/src/pages/makesqueak/MakeSqueak.js index 1db104cc..8262ae71 100644 --- a/frontend/react-material-admin/src/pages/makesqueak/MakeSqueak.js +++ b/frontend/react-material-admin/src/pages/makesqueak/MakeSqueak.js @@ -37,7 +37,15 @@ export default function MakeSqueakPage() { console.log( 'profileId:', profileId); console.log( 'content:', content); console.log( 'replyto:', replyto); - makeSqueak(profileId, content, replyto); + if (profileId == -1) { + alert('Signing profile must be selected.'); + return; + } + if (!content) { + alert('Content cannot be empty.'); + return; + } + makeSqueak(profileId, content, replyto); } const handleChange = (event) => { @@ -83,9 +91,19 @@ export default function MakeSqueakPage() { getSigningProfiles() }, []); + function MakeSqueakForm() { + return ( +
+ {MakeSelectSigningProfile()} + {MakeSqueakContentInput()} + {MakeSqueakButton()} +
+ ) + } + function MakeSelectSigningProfile() { return ( - + Signing Profile