Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
alexiscolin committed Sep 18, 2024
1 parent b85a1e8 commit 8718f20
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/views/FaqView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,17 @@ import markdownit from "markdown-it";
const { locale, messages } = useI18n();
function isFaqPage(obj: unknown): obj is { content: Array<{ question: string; answer: string }> } {
return typeof obj === "object" && obj !== null && "content" in obj;
}
const faqContent = computed(() => {
return (messages.value[locale.value].faqPage as any).content;
const currentMessages = messages.value[locale.value];
if (isFaqPage(currentMessages.faqPage)) {
return currentMessages.faqPage.content;
}
return [];
});
const md = markdownit({
Expand All @@ -29,7 +38,7 @@ const md = markdownit({
></div>

<div class="flex flex-row py-8 md:py-[72px]">
<p class="text-grey-100 text-400 lg:w-[800px] font-normal text-left text-pretty">
<p class="text-grey-100 text-400 lg:w-[px] font-normal text-left text-pretty">
<span class="block pb-8 lg:pb-[72px]">
<div v-for="(item, index) in faqContent" :key="index">
<h2 class="text-light mb-6">{{ item.question }}</h2>
Expand Down

0 comments on commit 8718f20

Please sign in to comment.