Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
"tailwindcss-animate": "^1.0.7",
"ts-pattern": "^5.8.0",
"typescript": "^5.5.4",
"typescript-plugin-css-modules": "^5.2.0",
"usehooks-ts": "^3.1.0",
"vite": "^5.2.0",
"vite-plugin-favicons-inject": "^2.2.0",
Expand Down
22 changes: 16 additions & 6 deletions frontend/src/app/actor-builds-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ import {
Icon,
} from "@rivet-gg/icons";
import { useInfiniteQuery } from "@tanstack/react-query";
import { Link, useNavigate } from "@tanstack/react-router";
import {
Link,
type LinkComponentProps,
useNavigate,
} from "@tanstack/react-router";
import { Fragment } from "react";
import { match } from "ts-pattern";
import { Button, cn, Skeleton } from "@/components";
import { ACTORS_PER_PAGE, useManager } from "@/components/actors";
import { VisibilitySensor } from "@/components/visibility-sensor";
Expand All @@ -14,7 +19,7 @@ export function ActorBuildsList() {
const { data, isLoading, hasNextPage, fetchNextPage, isFetchingNextPage } =
useInfiniteQuery(useManager().buildsQueryOptions());

const navigate = useNavigate({ from: "/" });
const navigate = useNavigate();

return (
<div className="h-full">
Expand All @@ -41,10 +46,15 @@ export function ActorBuildsList() {
size="sm"
onClick={() => {
navigate({
to:
__APP_TYPE__ === "engine"
? "/ns/$namespace"
: "/",
to: match(__APP_TYPE__)
.with("engine", () => "/ns/$namespace")
.with(
"cloud",
() =>
"/orgs/$organization/projects/$project/ns/$namespace",
)
.otherwise(() => "/"),

search: (old) => ({
...old,
n: [build.name],
Expand Down
Loading
Loading