import React from 'react';
import Section from 'shared/components/section/section';
import Question from './question/question';
import QuestionAnswerData from './questions';
import styles from './faq.css';

const FAQ = () => {
  const generalQuestions = QuestionAnswerData.general.map(question => (
    <Question q={question.question} a={question.answer} key={Math.random + question.question} />
  ));
  const donationQuestions = Data.donation.map(question => (
    <Question q={question.question} a={question.answer} key={Math.random + question.question} />
  ));
  const volunteerQuestions = Data.volunteer.map(question => (
    <Question q={question.question} a={question.answer} key={Math.random + question.question} />
  ));

  return (
    <Section title="General Questions" theme="white">
      <Section theme="white" headingLines={false}>
        <div className={styles.container}>{generalQuestions}</div>
      </Section>
      <Section title="Donation Questions" theme="white">
        <br />
        <div className={styles.container}>{donationQuestions}</div>
      </Section>
      <Section title="Volunteer Questions" theme="white">
        <br />
        <div className={styles.container}>{volunteerQuestions}</div>
      </Section>
    </Section>
  );
};

export default FAQ;

@@ -275,31 +275,26 @@
 eneral.map(q
-uestio
 n
+a
  =%3E (%0A    %3CQ
@@ -297,39 +297,34 @@
   %3CQuestion q=%7Bq
-uestio
 n
+a
 .question%7D a=%7Bqu
@@ -314,39 +314,34 @@
 a.question%7D a=%7Bq
-uestio
 n
+a
 .answer%7D key=%7BMa
@@ -338,38 +338,19 @@
 r%7D key=%7B
-Math.random + question
+qna
 .questio
@@ -385,24 +385,38 @@
 Questions = 
+QuestionAnswer
 Data.donatio
@@ -418,31 +418,26 @@
 nation.map(q
-uestio
 n
+a
  =%3E (%0A    %3CQ
@@ -440,39 +440,34 @@
   %3CQuestion q=%7Bq
-uestio
 n
+a
 .question%7D a=%7Bqu
@@ -457,39 +457,34 @@
 a.question%7D a=%7Bq
-uestio
 n
+a
 .answer%7D key=%7BMa
@@ -481,38 +481,19 @@
 r%7D key=%7B
-Math.random + question
+qna
 .questio
@@ -533,16 +533,30 @@
 tions = 
+QuestionAnswer
 Data.vol
@@ -567,23 +567,18 @@
 er.map(q
-uestio
 n
+a
  =%3E (%0A  
@@ -593,23 +593,18 @@
 ion q=%7Bq
-uestio
 n
+a
 .questio
@@ -610,23 +610,18 @@
 on%7D a=%7Bq
-uestio
 n
+a
 .answer%7D
@@ -630,30 +630,11 @@
 ey=%7B
-Math.random + question
+qna
 .que

Change other variable names