Skip to content

Commit a8959bc

Browse files
committed
feat(hub): functions
1 parent 1d4d4f6 commit a8959bc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+4645
-9774
lines changed

examples/system-test-route/src/shared/server.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ export function createAndStartServer(
2121
setInterval(() => {
2222
tickIndex++;
2323
console.log("Tick", tickIndex);
24+
console.log(
25+
JSON.stringify({ level: "info", message: "tick", tickIndex }),
26+
);
27+
console.log(`level=info message=tick tickIndex=${tickIndex}`);
2428
}, 1000);
2529

2630
// Get port from environment
@@ -37,14 +41,16 @@ export function createAndStartServer(
3741
const app = new Hono();
3842

3943
app.get("/health", (c) => c.text("ok"));
40-
44+
4145
// Add a catch-all route to handle any other path (for testing routeSubpaths)
4246
app.all("*", (c) => {
43-
console.log(`Received request to ${c.req.url} from ${c.req.header("x-forwarded-for") || "unknown"}`);
44-
return c.json({
45-
actorId,
47+
console.log(
48+
`Received request to ${c.req.url} from ${c.req.header("x-forwarded-for") || "unknown"}`,
49+
);
50+
return c.json({
51+
actorId,
4652
path: c.req.path,
47-
query: c.req.query()
53+
query: c.req.query(),
4854
});
4955
});
5056

frontend/apps/hub/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"@tanstack/react-query-devtools": "^5.58.0",
2929
"@tanstack/react-query-persist-client": "^5.56.2",
3030
"@tanstack/react-router": "^1.114.25",
31-
"@tanstack/react-table": "^8.20.6",
31+
"@tanstack/react-table": "^8.21.2",
3232
"@tanstack/router-devtools": "^1.114.25",
3333
"@tanstack/router-plugin": "^1.114.25",
3434
"@tanstack/zod-adapter": "^1.114.25",
@@ -40,6 +40,7 @@
4040
"framer-motion": "^11.2.11",
4141
"jotai": "^2.12.2",
4242
"lodash": "^4.17.21",
43+
"nanoid": "^5.1.5",
4344
"posthog-js": "^1.144.2",
4445
"react": "^19.0.0",
4546
"react-dom": "^19.0.0",

frontend/apps/hub/src/app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ declare module "@tanstack/react-router" {
2727
router: typeof router;
2828
}
2929
interface StaticDataRouteOption {
30-
layout?: "full" | "compact" | "onboarding" | "actors";
30+
layout?: "full" | "compact" | "onboarding" | "actors" | "v2";
3131
}
3232
}
3333

frontend/apps/hub/src/components/header/header-sub-nav.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,27 @@
11
import { useAuth } from "@/domains/auth/contexts/auth";
22
import { Skeleton, cn } from "@rivet-gg/components";
33
import { ErrorBoundary } from "@sentry/react";
4-
import { useMatchRoute } from "@tanstack/react-router";
4+
import {
5+
useMatches,
6+
useMatchRoute,
7+
useRouterState,
8+
} from "@tanstack/react-router";
59
import { Suspense, useContext } from "react";
610
import { MobileBreadcrumbsContext } from "../breadcrumbs/mobile-breadcrumbs";
711
import { HeaderEnvironmentLinks } from "./links/header-environment-links";
812
import { HeaderGroupLinks } from "./links/header-group-links";
913
import { HeaderProjectLinks } from "./links/header-project-links";
1014

1115
function Content() {
16+
const allMatches = useMatches();
17+
18+
const v2Envs = allMatches.find((match) => match.id.includes("/_v2/"));
19+
1220
const matchRoute = useMatchRoute();
1321

1422
const { profile } = useAuth();
1523

16-
if (!profile?.identity.isRegistered) {
24+
if (!profile?.identity.isRegistered || v2Envs) {
1725
return null;
1826
}
1927

0 commit comments

Comments
 (0)