Fix workspace shortcut navigation

This commit is contained in:
Mohamed Boudra
2026-04-20 18:06:09 +07:00
parent 95c1d1fe0f
commit 2cd296e38f
16 changed files with 513 additions and 155 deletions
@@ -0,0 +1,15 @@
import { useMemo } from "react";
import { usePathname } from "expo-router";
import { useHosts } from "@/runtime/host-runtime";
import { resolveActiveHost } from "@/utils/active-host";
export function useActiveHost() {
const pathname = usePathname();
const hosts = useHosts();
return useMemo(() => resolveActiveHost({ hosts, pathname }), [hosts, pathname]);
}
export function useActiveServerId(): string | null {
return useActiveHost()?.serverId ?? null;
}