Refactors loading function
* Initialize service component and handler in hooks * Dynamically watch the config instead of a reload on each page * Uses derived store for public server config * Moves service data in its own page data property * Reverts to a array to store group/services
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
import { type ServiceHandler } from '../service';
|
||||
import { type ServiceComponentPath, type ServiceHandler } from '../service';
|
||||
|
||||
export const handle: ServiceHandler = ({ config }) => {
|
||||
const data = {};
|
||||
if (config.apikey != undefined) {
|
||||
//TODO: fetch data
|
||||
}
|
||||
return { data, componentPath: 'pihole/PiHoleContent.svelte' };
|
||||
export const handle: ServiceHandler = () => {
|
||||
return { piholedata: 'coucou' };
|
||||
};
|
||||
|
||||
export const path: ServiceComponentPath = 'pihole/PiHoleContent.svelte';
|
||||
|
||||
Reference in New Issue
Block a user