feat: preserving state between route changes (#132)

This commit is contained in:
Ayaka Rizumu 2022-11-28 01:34:45 +08:00 committed by GitHub
parent d967520005
commit 6414f2a4e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 63 additions and 10 deletions

View file

@ -1,6 +1,6 @@
<script setup lang="ts">
const params = useRoute().params
const accountName = $computed(() => params.account as string)
const accountName = $(computedEager(() => params.account as string))
const account = await fetchAccountByName(accountName)
const paginator = account ? useMasto().accounts.getFollowersIterable(account.id, {}) : null

View file

@ -1,6 +1,6 @@
<script setup lang="ts">
const params = useRoute().params
const accountName = $computed(() => params.account as string)
const accountName = $(computedEager(() => params.account as string))
const account = await fetchAccountByName(accountName)
const paginator = account ? useMasto().accounts.getFollowingIterable(account.id, {}) : null

View file

@ -1,6 +1,6 @@
<script setup lang="ts">
const params = useRoute().params
const accountName = $computed(() => params.account as string)
const accountName = $(computedEager(() => params.account as string))
const account = await fetchAccountByName(accountName)
const tabNames = ['Posts', 'Posts & replies', 'Media'] as const