From b237c0b7a6c248e7013c43e0fe909b98b2185e64 Mon Sep 17 00:00:00 2001 From: b0txec Date: Tue, 18 Aug 2026 21:49:25 +0300 Subject: [PATCH] Fix router layout runtime crash --- web/src/App.tsx | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/web/src/App.tsx b/web/src/App.tsx index d1eb123..8261ed8 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -1,4 +1,4 @@ -import { Component } from 'solid-js' +import { Component, ParentComponent } from 'solid-js' import { A, Route, Router } from '@solidjs/router' import styles from './css/menu.module.css'; @@ -16,29 +16,35 @@ console.log("env:", import.meta.env.MODE) console.log("api host:", apiHost) const App: Component = () => { + return ( + + + + + + + + + + ); +}; + +const AppLayout: ParentComponent = (props) => { const pages = [ ['/station', 'Stations'], ['/cities', 'City analysis'], ['/latvia', 'Latvia overview'], ['/database', 'Data archive'], ['/harmonie', 'HARMONIE'], ['/lvgmc-forecast', 'LVÄ¢MC forecast'], ] return ( - -
+
WWeatherToolWeather data workspace
- - - - - - - + {props.children}
-
- +
); };