device switch

This commit is contained in:
2026-02-20 21:58:49 -05:00
parent 0c16353e2e
commit 1a5efceebd
10 changed files with 78 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
import { createSignal } from "solid-js";
import { createEffect, createSignal, on } from "solid-js";
import { createSimpleContext } from "./helper";
import { TABS, TabsCount } from "@/utils/navigation";
@@ -10,6 +10,13 @@ export const { use: useNavigation, provider: NavigationProvider } =
const [activeDepth, setActiveDepth] = createSignal(0);
const [inputFocused, setInputFocused] = createSignal(false);
createEffect(
on(
() => activeTab,
() => setActiveDepth(0),
),
);
//conveniences
const nextTab = () => {
if (activeTab() >= TabsCount) {