Skip to content

Commit

Permalink
Merge pull request #177 from HE-Arc/sp-176-fix-community-disclaimer
Browse files Browse the repository at this point in the history
Correcting communnity disclaimer
  • Loading branch information
Krucksy authored Apr 26, 2024
2 parents 9ced24e + acb35c0 commit 9d2a6d1
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions frontend/src/views/QuizView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,17 @@ const fetchUserIQ = async () => {
graphComponent.value.addData(userIq);
};
const displayDisclaimer = async () => {
const categoryName = await APIClient.getCategoryName(id_category);
if (categoryName === 'Community') { // checking name because id is different in production
disclaimer.value = true;
}
}
onMounted(() => {
fetchNewQuestion();
fetchUserIQ();
// Check if URL is matching to community category
if (route.params.id_category === '23') {
disclaimer.value = true;
}
displayDisclaimer();
});
</script>

Expand Down Expand Up @@ -66,11 +69,10 @@ onMounted(() => {
</template>

<style scoped>
.quiz
{
.quiz {
padding-bottom: 2rem;
}
.title {
text-align: center;
}
Expand Down

0 comments on commit 9d2a6d1

Please sign in to comment.