import { Route, Routes, useLocation, useNavigate } from '@solidjs/router' import { For, Show, onMount } from 'solid-js' import { Header } from '~/components/Header' import { themes } from '~/constants' import { Config } from '~/pages/Config' import { Connections } from '~/pages/Connections' import { Logs } from '~/pages/Logs' import { Overview } from '~/pages/Overview' import { Proxies } from '~/pages/Proxies' import { Rules } from '~/pages/Rules' import { Setup } from '~/pages/Setup' import { curTheme, selectedEndpoint, setCurTheme } from '~/signals' export const App = () => { const location = useLocation() const navigate = useNavigate() onMount(() => { if (!selectedEndpoint()) { navigate('/setup') } }) return (