Skip to content

Commit

Permalink
feat(#298): Made Userview listen on route change
Browse files Browse the repository at this point in the history
  • Loading branch information
lxgr-linux committed May 2, 2024
1 parent a57bb09 commit 83996d7
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions src/views/UserView/UserView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,23 @@
<br>
<b>Alias</b> <br>{{ state.user.alias }}<br>
<br>
<b>{{ state.user.earlyAccess?.active ? "Early access" : "No early access" }}</b>
<b>{{
state.user.earlyAccess?.active
? "Early access"
: "No early access"
}}</b>
<template v-if="state.user.earlyAccess?.active">
<p v-if="state.user.earlyAccess?.invitedByUser">
Inviter: <CompactAddressComponent :addr="state.user.earlyAccess?.invitedByUser" />
Inviter:
<CompactAddressComponent
:addr="state.user.earlyAccess?.invitedByUser"
/>
</p>
<p v-else-if="state.user.earlyAccess?.invitedUser">
Invited: <CompactAddressComponent :addr="state.user.earlyAccess?.invitedUser" />
Invited:
<CompactAddressComponent
:addr="state.user.earlyAccess?.invitedUser"
/>
</p>
</template>
</template>
Expand Down Expand Up @@ -259,13 +269,14 @@ const init = () => {
router.push({ name: "NotFound" });
}
router.push({ name: "UserView", params: { id: state.addr } });
getUser();
getCoins();
getMatches();
console.log(state.user)
console.log(state.user);
};
watch(() => route.params.id, init);
onMounted(init);
const getUser = () => {
Expand Down

0 comments on commit 83996d7

Please sign in to comment.