import { component$, Slot } from '@builder.io/qwik' import { Link, loader$, useLocation } from '@builder.io/qwik-city' import { getDatabase } from 'wildebeest/backend/src/database' import { getSettings } from 'wildebeest/backend/src/config/server' import { ServerAboutData } from './about' import { ServerBrandingData } from './branding' export { adminLoader } from '~/utils/adminLoader' export type ServerSettingsData = ServerBrandingData & ServerAboutData export const serverSettingsLoader = loader$>>(async ({ platform }) => { const database = await getDatabase(platform) const settings = await getSettings(database) return JSON.parse(JSON.stringify(settings)) }) export default component$(() => { const sectionLinks = [ { text: 'Branding', faIcon: 'fa-pen', path: 'branding', }, { text: 'About', faIcon: 'fa-file-lines', path: 'about', }, { text: 'Rules', faIcon: 'fa-pen-ruler', path: 'rules', }, ] as const const currentPath = useLocation().url.pathname.replace(/\/$/, '') return (

Server Settings

) })