Skip to content

Commit

Permalink
Remove option to message user from STING workflows (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
cznrhubarb authored Aug 16, 2023
1 parent 2c01728 commit aef7734
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 19 deletions.
2 changes: 0 additions & 2 deletions src/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,6 @@
"sting.notesPlaceholder": "Why is this post STING-related? (Required)",
"sting.notesAreRequired": "Notes are required.",
"sting.coachNotes": "Coach Notes",
"sting.messagePlaceholder": "Enter a message to be sent to the user from the STING Guide after being transferred. (Optional)",
"sting.messageToSend": "Message to send to user",
"sting.addNewNote": "Add New Note",
"sting.transferUser": "Transfer User to STING Dash"
}
2 changes: 0 additions & 2 deletions src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,6 @@
"sting.notesPlaceholder": "Why is this post STING-related? (Required)",
"sting.notesAreRequired": "Notes are required.",
"sting.coachNotes": "Coach Notes",
"sting.messagePlaceholder": "Enter a message to be sent to the user from the STING Guide after being transferred. (Optional)",
"sting.messageToSend": "Message to send to user",
"sting.addNewNote": "Add New Note",
"sting.transferUser": "Transfer User to STING Dash"
}
2 changes: 0 additions & 2 deletions src/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,6 @@
"sting.notesPlaceholder": "Why is this post STING-related? (Required)",
"sting.notesAreRequired": "Notes are required.",
"sting.coachNotes": "Coach Notes",
"sting.messagePlaceholder": "Enter a message to be sent to the user from the STING Guide after being transferred. (Optional)",
"sting.messageToSend": "Message to send to user",
"sting.addNewNote": "Add New Note",
"sting.transferUser": "Transfer User to STING Dash"
}
15 changes: 2 additions & 13 deletions src/social/components/Sting/StingModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ export const StingModal = ({ userAccessCode, pathToContent, isOpen, onClose }: S
reset();
}, [isOpen]);

const onSubmit = async (data: { messageToSend: string | undefined; coachNotes: string }) => {
const onSubmit = async (data: { coachNotes: string }) => {
let canAttachNote = true;
if (!userInStingDash) {
canAttachNote = await transferUserToStingCallback(userAccessCode, data.messageToSend);
canAttachNote = await transferUserToStingCallback(userAccessCode);
}
if (canAttachNote) {
const realPath = pathToContent.replace(
Expand Down Expand Up @@ -107,17 +107,6 @@ export const StingModal = ({ userAccessCode, pathToContent, isOpen, onClose }: S
/>
<ErrorMessage errors={errors} name="coachNotes" />
</Box>
{!userInStingDash && (
<Box>
<FormLabel>
<FormattedMessage id="sting.messageToSend" />
</FormLabel>
<Textarea
placeholder={formatMessage({ id: 'sting.messagePlaceholder' })}
{...register('messageToSend')}
/>
</Box>
)}

<ButtonGroup w="100%" justifyContent="center">
<Button colorScheme="primary" type="submit">
Expand Down

0 comments on commit aef7734

Please sign in to comment.