Skip to content

Commit

Permalink
feat: log out with nuxt auth
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroAkbal committed Feb 22, 2021
1 parent 5f26d6b commit 8606fe0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions components/pages/premium/PremiumDashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,14 @@
<!-- Remaining -->
<div class="my-4 text-center">
<p class="text-sm text-default-text-muted">Your subscription is</p>
<p class="text-3xl font-semibold text-gradient-one">
{{ isUserPremium ? 'Active' : 'Not active' }}
</p>
<p class="text-3xl font-semibold text-gradient-one">Active</p>
</div>

<!-- Log out -->
<button
type="button"
class="block ml-auto leading-none color-util"
@click="logOut()"
@click="logOut"
>
Log out
</button>
Expand All @@ -43,9 +41,11 @@ export default {
},
methods: {
logOut() {
async logOut() {
localStorage.removeItem('premium')
await this.$auth.logout()
location.reload()
},
},
Expand Down

0 comments on commit 8606fe0

Please sign in to comment.