Skip to content

Commit

Permalink
Merge pull request #489 from CodingFactory-Repos/develop-G7
Browse files Browse the repository at this point in the history
add await on onMounted
  • Loading branch information
Loule95450 committed Jun 16, 2023
2 parents 10f749e + caf4ecc commit 82c264b
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions front-end/src/components/blog/DisplayArticles.vue
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,6 @@ const redirectNewArticle = () => {
router.push('/app/blog/new');
};
// Fetch the articles
const getArticles = async () => {
await articleStore.getArticle();
};
const tabs = ref([
{ id: 'all', label: 'Tous' },
{ id: 'infos', label: 'Infos' },
Expand Down Expand Up @@ -210,8 +205,8 @@ const filteredItems = (tabId) => {
};
// Call the getArticles method when the component is created
onMounted(() => {
getArticles();
onMounted(async () => {
await articleStore.getArticle();
});
</script>

Expand Down

0 comments on commit 82c264b

Please sign in to comment.