diff --git a/client/dist/styles.css b/client/dist/styles.css
index 7f23cb1..a186ad7 100644
--- a/client/dist/styles.css
+++ b/client/dist/styles.css
@@ -548,9 +548,15 @@ input:checked+.slider:before {
margin-top: 20px;
border-bottom: solid grey 2px;
}
+
+.question-helpful-div {
+ display: inline-flex;
+ flex-direction: row;
+ font-size: 15px;
+}
/* .question-list {
width: auto;
- height: 40vh;
+ height: 50vh;
overflow-y: scroll;
} */
.question-control {
diff --git a/client/src/QA/QAcomponents/AddQuestion.jsx b/client/src/QA/QAcomponents/AddQuestion.jsx
index 814d41b..b762781 100644
--- a/client/src/QA/QAcomponents/AddQuestion.jsx
+++ b/client/src/QA/QAcomponents/AddQuestion.jsx
@@ -12,7 +12,7 @@ const AddQuestion = ({ productId, handleModalClose, openModal, prodName }) => {
};
const regexVerifyEmail = (email) => {
- const characterTest = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
+ const characterTest = /^(([^<>()[\]\\.,;:\s@']+(\.[^<>()[\]\\.,;:\s@']+)*)|('.+'))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return characterTest.test(email);
};
@@ -31,7 +31,9 @@ const AddQuestion = ({ productId, handleModalClose, openModal, prodName }) => {
body: questionBody,
name: name,
email: email,
+ /* eslint-disable */
product_id: productId
+ /* eslint-enable */
})
.then((response) => {
console.log('succesful question post', response.data);
@@ -43,7 +45,7 @@ const AddQuestion = ({ productId, handleModalClose, openModal, prodName }) => {
: null;
};
const QuestionModalForm = (
-
selectModal(event)}
>
@@ -66,11 +68,11 @@ const AddQuestion = ({ productId, handleModalClose, openModal, prodName }) => {
{ dataFill(event); }}
- placeholder="Example: jack@email.com"
- type="email"
+ placeholder='Example: jack@email.com'
+ type='email'
name='email'
- maxLength="60"
- autoComplete="off"
+ maxLength='60'
+ autoComplete='off'
value={email}
required
>
@@ -83,11 +85,11 @@ const AddQuestion = ({ productId, handleModalClose, openModal, prodName }) => {
{ dataFill(event); }}
- placeholder="Examples: jackson11!"
- type="text"
+ placeholder='Examples: jackson11!'
+ type='text'
name='name'
- maxLength="60"
- autoComplete="off"
+ maxLength='60'
+ autoComplete='off'
value={name}
required
>
@@ -100,12 +102,12 @@ const AddQuestion = ({ productId, handleModalClose, openModal, prodName }) => {
diff --git a/client/src/QA/QAcomponents/AnswerHelpful.jsx b/client/src/QA/QAcomponents/AnswerHelpful.jsx
index ea42b64..50a35ab 100644
--- a/client/src/QA/QAcomponents/AnswerHelpful.jsx
+++ b/client/src/QA/QAcomponents/AnswerHelpful.jsx
@@ -33,7 +33,7 @@ const AnswerHelpful = ({ answerHelpfulness, answerDate, answerId, answerName })
: null;
};
return (
-
+
<>by {answerName}, {convertDate(answerDate)} |>
Helpful?
{
);
return (
-
+
![]()
(
-
+
A: {answer.body}
{answer.photos.length ? answer.photos.map((photo, id) => (
diff --git a/client/src/QA/QAcomponents/MoreAnswers.jsx b/client/src/QA/QAcomponents/MoreAnswers.jsx
index afef56f..f7ea939 100644
--- a/client/src/QA/QAcomponents/MoreAnswers.jsx
+++ b/client/src/QA/QAcomponents/MoreAnswers.jsx
@@ -5,7 +5,7 @@ const MoreAnswers = ({ answer, answerList }) => {
const [collapseAnswers, setCollapseAnswers] = useState(true);
return (
-
+
{
collapseAnswers
? <>
diff --git a/client/src/QA/QAcomponents/MoreQuestions.jsx b/client/src/QA/QAcomponents/MoreQuestions.jsx
index 018feda..00b7cbe 100644
--- a/client/src/QA/QAcomponents/MoreQuestions.jsx
+++ b/client/src/QA/QAcomponents/MoreQuestions.jsx
@@ -5,7 +5,7 @@ const MoreQuestions = ({ questions }) => {
const [collapseQuestions, setCollapseQuestions] = useState(true);
return (
-
+
{
collapseQuestions
? <>
diff --git a/client/src/QA/QAcomponents/Question.jsx b/client/src/QA/QAcomponents/Question.jsx
index 9a1f50d..8e65d08 100644
--- a/client/src/QA/QAcomponents/Question.jsx
+++ b/client/src/QA/QAcomponents/Question.jsx
@@ -8,7 +8,7 @@ const Question = ({ question, productId }) => {
let answerList = answerKey.map(Ans => question.answers[Ans]);
return (
-
+
Q: {question.question_body}
-
-
);
return (
-
+
Helpful?
(
-
+
{
searchInput === null
?
diff --git a/client/src/QA/QAcomponents/Search.jsx b/client/src/QA/QAcomponents/Search.jsx
index 6d66a28..5661e9f 100644
--- a/client/src/QA/QAcomponents/Search.jsx
+++ b/client/src/QA/QAcomponents/Search.jsx
@@ -9,7 +9,7 @@ const Search = ({ handleSearch, searchInput }) => {
};
return (
-