♻️ Migrate the exploring page
This commit is contained in:
15
app/stores/pub.ts
Normal file
15
app/stores/pub.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref } from 'vue'
|
||||
import { useSolarNetwork } from '~/composables/useSolarNetwork'
|
||||
|
||||
export const usePubStore = defineStore('pub', () => {
|
||||
const publishers = ref<any[]>([])
|
||||
|
||||
async function fetchPublishers() {
|
||||
const api = useSolarNetwork()
|
||||
const resp = await api('/publishers')
|
||||
publishers.value = resp as any[]
|
||||
}
|
||||
|
||||
return { publishers, fetchPublishers }
|
||||
})
|
Reference in New Issue
Block a user