Only send library in support form if category is problem

This commit is contained in:
Joshen Lim committed 2022-10-21 17:36:27 +07:00
1 parent f9d4cc7d70
commit b03b780eb0
1 file changed
+2 -1
@@ -142,7 +142,8 @@ const SupportForm: FC<Props> = ({ setSentCategory }) => {
const payload = {
...values,
library: selectedLibrary !== undefined ? selectedLibrary.key : '',
library:
values.category === 'Problem' && selectedLibrary !== undefined ? selectedLibrary.key : '',
message: formatMessage(values.message, attachments),
verified: true,
tags: ['dashboard-support-form'],