♻️ Migrate the exploring page
This commit is contained in:
10
app/composables/useSolarNetwork.ts
Normal file
10
app/composables/useSolarNetwork.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
// Solar Network aka the api client
|
||||
export const useSolarNetwork = () => {
|
||||
const apiBase = useSolarNetworkUrl();
|
||||
return $fetch.create({ baseURL: apiBase, credentials: 'include' })
|
||||
}
|
||||
|
||||
export const useSolarNetworkUrl = () => {
|
||||
const config = useRuntimeConfig()
|
||||
return config.public.apiBase
|
||||
}
|
Reference in New Issue
Block a user