From 43d3daac470edde22f2b637dc2ad7a27b832c31d Mon Sep 17 00:00:00 2001 From: bot-hermes Date: Mon, 7 Sep 2026 19:39:44 +0000 Subject: [PATCH] fix: resolve circular type inference in _app/index.tsx route The dashboard route imported Route from '../_app', which resolves to itself (_app/index.tsx IS the _app route), creating a self-referencing circular type inference (TS7022/TS7023). Fix by importing the root route from '__root' as the parent, which is the correct ancestor in the route tree hierarchy. --- apps/web/src/routes/_app/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/src/routes/_app/index.tsx b/apps/web/src/routes/_app/index.tsx index e16937b..a493056 100644 --- a/apps/web/src/routes/_app/index.tsx +++ b/apps/web/src/routes/_app/index.tsx @@ -1,6 +1,6 @@ import { useState, useEffect } from "react"; import { createRoute } from "@tanstack/react-router"; -import { Route as appRoute } from "../_app"; +import { Route as rootRoute } from "../__root"; import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query"; import { api, useApiQuery, useApiMutation } from "@/lib/api"; import { useRealtime } from "@/hooks/use-realtime"; @@ -505,7 +505,7 @@ function DashboardPage() { } export const Route = createRoute({ - getParentRoute: () => appRoute, + getParentRoute: () => rootRoute, path: "/", component: DashboardPage, });