diff --git a/src/ui/pages/Secrets/KeyValue/KeyValueEdit.tsx b/src/ui/pages/Secrets/KeyValue/KeyValueEdit.tsx index 487a02b..6a3c521 100644 --- a/src/ui/pages/Secrets/KeyValue/KeyValueEdit.tsx +++ b/src/ui/pages/Secrets/KeyValue/KeyValueEdit.tsx @@ -16,6 +16,8 @@ import { import { combineKVPath, splitKVPath } from "./kvPathUtils"; import { sortedObjectMap } from "../../../../utils"; import i18next from "i18next"; +import { route } from "preact-router"; +import { kvViewURL } from "../../pageLinks"; export type KVEditProps = DefaultPageProps & { baseMount: string; @@ -90,7 +92,7 @@ export class KVEditor extends Component { combined.secretItem, parseData(editorContent, this.state.syntax), ); - window.history.back(); + route(kvViewURL(this.props.baseMount, this.props.secretPath, this.props.secretItem)); } catch (e: unknown) { const error = e as Error; this.errorMessageRef.current.setErrorMessage(error.message);