mekasu0124

Untitled

Feb 18th, 2024
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const getAboutQuestions = () => {
  2.   return aboutQuestions.map((q) => {
  3.     let tuple = [q[0], q[1], q[2]];
  4.     let [id, question, answer] = tuple;
  5.     let fixed_question = question.toLowerCase().replace(/ /g, "-");
  6.     let new_question = fixed_question.slice(0, -1);
  7.  
  8.     return (
  9.       <AboutStory className="container" key={id} id={new_question}>
  10.         <Button type="button" className="collapsible">{question}</Button>
  11.         <AboutStoryBox className="content container">
  12.           <AboutDetails>{answer}</AboutDetails>
  13.           <AboutTop href="/about/">Top</AboutTop>
  14.         </AboutStoryBox>
  15.       </AboutStory>
  16.     );
  17.   });
  18. };
  19.  
  20. <AboutQuestionAnswers className="container">
  21.   {getAboutQuestions()}
  22. </AboutQuestionAnswers>
Advertisement
Add Comment
Please, Sign In to add comment