From 58dd3f2f41c49302bc17342b441cf094e063c769 Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Sun, 3 Sep 2023 12:17:30 +0100 Subject: [PATCH] Fix flickering numbers --- src/components/Questions/QuestionCard.tsx | 6 +++--- src/components/Questions/QuestionsProgress.tsx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/Questions/QuestionCard.tsx b/src/components/Questions/QuestionCard.tsx index 8bc7af826..253178c93 100644 --- a/src/components/Questions/QuestionCard.tsx +++ b/src/components/Questions/QuestionCard.tsx @@ -1,4 +1,4 @@ -import { useEffect, useRef, useState } from 'react'; +import { Fragment, useEffect, useRef, useState } from 'react'; import type { QuestionType } from '../../lib/question-group'; import { markdownToHtml } from '../../lib/markdown'; import Prism from 'prismjs'; @@ -58,12 +58,12 @@ export function QuestionCard(props: QuestionCardProps) { const totalTopics = question.topics?.length || 0; return ( - <> + {topic} {counter !== totalTopics - 1 && ( · )} - + ); })} diff --git a/src/components/Questions/QuestionsProgress.tsx b/src/components/Questions/QuestionsProgress.tsx index b201cdb1c..4cdb35145 100644 --- a/src/components/Questions/QuestionsProgress.tsx +++ b/src/components/Questions/QuestionsProgress.tsx @@ -46,7 +46,7 @@ export function QuestionsProgress(props: QuestionsProgressProps) { Knew - {knowCount} Questions + {knowCount} Questions @@ -54,7 +54,7 @@ export function QuestionsProgress(props: QuestionsProgressProps) { Learnt - {didNotKnowCount} Questions + {didNotKnowCount} Questions @@ -62,7 +62,7 @@ export function QuestionsProgress(props: QuestionsProgressProps) { Skipped - {skippedCount} Questions + {skippedCount} Questions