From 1676cc7ce246484bbf65949ca6641b45812de246 Mon Sep 17 00:00:00 2001 From: Claas Date: Thu, 20 Jun 2024 20:31:08 +0200 Subject: [PATCH] Add toggle to switch between two approaches --- src/routes/journey.tsx | 107 +++++++++++++++++++++++++++-------------- 1 file changed, 72 insertions(+), 35 deletions(-) diff --git a/src/routes/journey.tsx b/src/routes/journey.tsx index 23ef882..8a815c5 100644 --- a/src/routes/journey.tsx +++ b/src/routes/journey.tsx @@ -1,4 +1,4 @@ -import { For, type JSX } from "solid-js"; +import { For, Show, createSignal, type JSX } from "solid-js"; /** * A recursive component building the tree of connections @@ -27,7 +27,7 @@ function Connection({ ); } -export function Journey1() { +function Journey1() { return ( <>
@@ -48,11 +48,12 @@ type Connection2Properties = { headsign: string; }; const TRAM_COLOR = "bg-[#9f3d53]"; + function Connection2(properties: Connection2Properties): JSX.Element { return (