From 6b99ea3bacf6b87d233b4edf5b471eed4fc2a671 Mon Sep 17 00:00:00 2001 From: lakshya Date: Fri, 26 Apr 2024 18:23:48 +0530 Subject: [PATCH] PR review changes Signed-off-by: lakshya --- site/src/assets/data/faq/index.js | 2 +- site/src/components/Faq/faqSection.style.js | 4 +-- site/src/components/Faq/index.js | 28 ++++++++++----------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/site/src/assets/data/faq/index.js b/site/src/assets/data/faq/index.js index 68436fd..69c7c22 100644 --- a/site/src/assets/data/faq/index.js +++ b/site/src/assets/data/faq/index.js @@ -63,7 +63,7 @@ const data = { "Are designs that I create in the Meshery Playground saved or will I lose any work that I do in the playground?", category: "Meshery Playground", answer: ` -Yes, all of the designs that you have created in the Meshery Playground are saved to your user account and will be available to you each time that you return to the Playground. The designs will also be available in your other Meshery deployments. +- Yes, all of the designs that you have created in the Meshery Playground are saved to your user account and will be available to you each time that you return to the Playground. The designs will also be available in your other Meshery deployments. `, }, { diff --git a/site/src/components/Faq/faqSection.style.js b/site/src/components/Faq/faqSection.style.js index a746724..67e0e57 100644 --- a/site/src/components/Faq/faqSection.style.js +++ b/site/src/components/Faq/faqSection.style.js @@ -73,8 +73,8 @@ const FaqSectionWrapper = styled.section` font-size: 20px; width: 80%; padding: 1rem; - border: 1px solid #ffffff; - background-color: #f0f0f0; + border: 1px solid #FFFFFF; + background-color: #F0F0F0; border-radius: 1.25rem; } } diff --git a/site/src/components/Faq/index.js b/site/src/components/Faq/index.js index 2775878..c201137 100644 --- a/site/src/components/Faq/index.js +++ b/site/src/components/Faq/index.js @@ -18,20 +18,20 @@ import remarkGfm from "remark-gfm"; const Faq = (props) => { let faq_keys = []; - let faqs_data = []; - if (props.category === undefined) faqs_data = data.faqs; - else { - props.category.forEach((item) => { - if (item === "all") faqs_data = data.faqs; - else { - data.faqs.forEach((faq) => { - if (faq.category.toString() === item) { - faqs_data.push(faq); - } - }); - } - }); - } + let faqs_data = []; + if (props.category === undefined) + faqs_data = data.faqs; + else { + props.category.forEach(item => { + if (item === "all") + faqs_data = data.faqs; + else { + data.faqs.forEach(faq => { + if (faq.category.toString() === item) { + faqs_data.push(faq); + } + }); + } let faqs = faqs_data.reduce((faq, ind) => { faq[ind.category] = [...(faq[ind.category] || []), ind];