feat: disable SSR

This commit is contained in:
Anthony Fu 2022-11-23 07:08:36 +08:00
parent e59b3e5db2
commit a6578155ae
29 changed files with 109 additions and 175 deletions

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import type { Account, MastoClient } from 'masto'
import type { Account } from 'masto'
const { account } = defineProps<{
account: Account
@ -7,11 +7,8 @@ const { account } = defineProps<{
const relationship = $(useRelationship(account))
let masto: MastoClient
async function toggleFollow() {
relationship!.following = !relationship!.following
masto ??= await useMasto()
await masto.accounts[relationship!.following ? 'follow' : 'unfollow'](account.id)
}
</script>