feat: avoid reloading the page when changing accounts (#180)

This commit is contained in:
Daniel Roe 2022-11-27 15:13:04 +00:00 committed by GitHub
parent e2000321c5
commit 729b36a606
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 56 additions and 56 deletions

View file

@ -1 +1,7 @@
export const useMasto = () => useNuxtApp().$masto
import type { MastoClient } from 'masto'
export const useMasto = () => useNuxtApp().$masto.api
export const setMasto = (masto: MastoClient) => {
useNuxtApp().$masto?.replace(masto)
}