don't show suggestions when suggestions.length === 0, show 'Rozpocznij od nowa' button in review mode on every tab

This commit is contained in:
Dawid Wysokiński 2021-04-17 18:47:00 +02:00
parent 5860d13b37
commit b6ec058603
2 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ const TestPage = ({ questions, suggestions, qualification }: TestPageProps) => {
} ${polishPlurals('pytanie', 'pytania', 'pytań', questions.length)}`}
/>
<Test initialQuestions={questions} qualification={qualification} />
<Suggestions suggestions={suggestions} />
{suggestions.length > 0 && <Suggestions suggestions={suggestions} />}
</Layout>
);
};

View File

@ -59,7 +59,7 @@ const Navigation = ({
Zakończ test
</Button>
)}
{isLastQuestion && reviewMode && (
{reviewMode && (
<Button startIcon={<RefreshIcon />} onClick={onReset}>
Rozpocznij od nowa
</Button>