import { Link, createRootRoute, useMatch, useMatches } from "@tanstack/react-router" import { AnimatePresence } from "framer-motion" import { Suspense, lazy } from "react" import { AnimatedOutlet } from "../AnimatedOutlet" const TanStackRouterDevtools = process.env.NODE_ENV === "production" ? () => null : lazy(() => import("@tanstack/router-devtools").then(res => ({ default: res.TanStackRouterDevtools }))) export function Root() { const matches = useMatches() const match = useMatch({ strict: false }) const nextMatch = matches[ matches.findIndex(d => d.id === match.id) + 1 ] return <>