import { Outlet } from "react-router-dom"; import { useIsFetching } from "@tanstack/react-query"; import { Sidebar } from "./Sidebar"; export function Layout() { // useIsFetching() returns the number of in-flight queries and is 0 on // first load (queries that have not yet fired are not counted). We use it // to drive a 1px hairline scan element at the very top of the layout. const isFetching = useIsFetching(); const showScan = isFetching > 0; return (