--- import { getGuideTableOfContent, type GuideFileType, HeadingGroupType, } from '../../lib/guide'; import MarkdownFile from '../MarkdownFile.astro'; import { TableOfContent } from '../TableOfContent/TableOfContent'; import { markdownToHtml, replaceVariables } from '../../lib/markdown'; import { QuestionGroupType } from '../../lib/question-group'; import { QuestionsList } from './QuestionsList'; interface Props { questionGroup: QuestionGroupType; } const { questionGroup } = Astro.props; const allHeadings = questionGroup.getHeadings(); const tableOfContent: HeadingGroupType[] = [ ...getGuideTableOfContent(allHeadings), { depth: 2, title: 'Test with Flashcards', children: [], slug: 'test-with-flashcards', text: 'Test yourself with Flashcards', }, { depth: 2, title: 'Questions List', children: [ { depth: 2, title: 'Beginner Level', children: [], slug: 'beginner-level', text: 'Beginner Level', } as HeadingGroupType, { depth: 2, title: 'Intermediate Level', children: [], slug: 'intermediate-level', text: 'Intermediate Level', } as HeadingGroupType, { depth: 2, title: 'Advanced Level', children: [], slug: 'advanced-level', text: 'Advanced Level', } as HeadingGroupType, ], slug: 'questions-list', text: 'Questions List', }, ]; const showTableOfContent = tableOfContent.length > 0; const { frontmatter: guideFrontmatter, author } = questionGroup; ---
{ showTableOfContent && (
) }

{replaceVariables(guideFrontmatter.title)}

{ author && (

{author.frontmatter.name} {author.frontmatter.name}

) }

Test yourself with Flashcards

You can either use these flashcards or jump to the questions list section below to see them in a list format.

Questions List

If you prefer to see the questions in a list format, you can find them below.

{ ['beginner', 'intermediate', 'advanced'].map((questionLevel) => (

{questionLevel} Level

{questionGroup.questions .filter((q) => { return q.topics .map((t) => t.toLowerCase()) .includes(questionLevel); }) .map((q) => (

{q.question}

))}
)) }