diff --git a/src/ui/pages/Secrets/SecretTitleElement.tsx b/src/ui/pages/Secrets/SecretTitleElement.tsx
index 2b5e040..0a893f3 100644
--- a/src/ui/pages/Secrets/SecretTitleElement.tsx
+++ b/src/ui/pages/Secrets/SecretTitleElement.tsx
@@ -1,5 +1,5 @@
import { JSX } from "preact/jsx-runtime";
-import { kvListURL } from "../pageLinks";
+import { kvListURL, kvViewURL, transitViewSecretURL } from "../pageLinks";
import { route } from "preact-router";
type SecretTitleElementProps = {
@@ -53,7 +53,21 @@ export function SecretTitleElement(props: SecretTitleElementProps): JSX.Element
);
})}
- {item.length != 0 && {item}}
+
+ {item.length != 0 && (() => {
+ if (["kv", "transit"].includes(type)) {
+ return {
+ if (type == "kv") {
+ route(kvViewURL(baseMount, secretPath, item))
+ } else if (type == "transit") {
+ route(transitViewSecretURL(baseMount, item))
+ }
+ }}>{item}
+ } else {
+ return {item}
+ }
+ })()}
+
{suffix.length != 0 && {suffix}}