Skip to content

Commit

Permalink
3е занятие - правки по 5й задаче
Browse files Browse the repository at this point in the history
  • Loading branch information
Vombat committed Dec 24, 2024
1 parent 64c33a6 commit 369f0cf
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions 02-basics-2/50-selected-meetup/SelectedMeetupApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,19 @@ export default defineComponent({
setup() {
const meetupId = ref(1);
const currentMeetup = ref(null);
async function getMeetupInfo(id) {
return await getMeetup(id)
}

onMounted(async () => {
currentMeetup.value = await getMeetupInfo(meetupId.value);
currentMeetup.value = await getMeetup(meetupId.value);

})

watch(meetupId, async () => {
currentMeetup.value = await getMeetupInfo(meetupId.value);
currentMeetup.value = await getMeetup(meetupId.value);
})


return {
getMeetupInfo,
getMeetup,
meetupId,
currentMeetup
}
Expand Down

0 comments on commit 369f0cf

Please sign in to comment.