-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[UI v2] feat: Adds deployment flow link (#17020)
- Loading branch information
1 parent
9e834e6
commit b3a815d
Showing
2 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { buildFLowDetailsQuery } from "@/api/flows"; | ||
import { Icon } from "@/components/ui/icons"; | ||
import { useQuery } from "@tanstack/react-query"; | ||
import { Link } from "@tanstack/react-router"; | ||
|
||
type DeploymentFlowLinkProps = { | ||
flowId: string; | ||
}; | ||
|
||
export const DeploymentFlowLink = ({ flowId }: DeploymentFlowLinkProps) => { | ||
const { data } = useQuery(buildFLowDetailsQuery(flowId)); | ||
|
||
return ( | ||
<div className="flex items-center gap-1 text-sm"> | ||
Flow | ||
<Link | ||
to="/flows/flow/$id" | ||
params={{ id: flowId }} | ||
className="flex items-center gap-1" | ||
> | ||
<Icon id="Workflow" className="h-4 w-4" /> | ||
{data?.name} | ||
</Link> | ||
</div> | ||
); | ||
}; |