feat: disable SSR
This commit is contained in:
parent
e59b3e5db2
commit
a6578155ae
29 changed files with 109 additions and 175 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue