Skip to content

Commit

Permalink
PR review changes
Browse files Browse the repository at this point in the history
Signed-off-by: lakshya <[email protected]>
  • Loading branch information
lakshz committed Apr 26, 2024
1 parent dcf8d71 commit 6b99ea3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion site/src/assets/data/faq/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
`,
},
{
Expand Down
4 changes: 2 additions & 2 deletions site/src/components/Faq/faqSection.style.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
28 changes: 14 additions & 14 deletions site/src/components/Faq/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 6b99ea3

Please sign in to comment.