Skip to content

Commit

Permalink
feat: redirect logged users to /home (#640)
Browse files Browse the repository at this point in the history
  • Loading branch information
wa0x6e authored Aug 27, 2024
1 parent 26a108f commit 54c2cbe
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion apps/ui/src/views/Landing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,26 @@ const SOCIALS = [
icon: ICGithub
}
];
const router = useRouter();
const { web3, authInitiated } = useWeb3();
watch(
() => web3.value.account,
account => {
if (!account) return;
router.push({ name: 'my-home' });
},
{ immediate: true }
);
</script>

<template>
<div>
<div v-if="!authInitiated || web3.authLoading" class="p-4">
<UiLoading />
</div>
<div v-else>
<div class="py-8 mb-6 border-b hero">
<UiContainer class="!max-w-screen-md my-1">
<h1 class="mb-4 mono max-w-[580px]">
Expand Down

0 comments on commit 54c2cbe

Please sign in to comment.