From 98220b7ab42c9a345fdf7a3b7f6716774eb97b9e Mon Sep 17 00:00:00 2001 From: acethecreator Date: Tue, 11 Mar 2025 16:24:40 +0100 Subject: [PATCH 1/2] add relative pathname --- library/src/containers/Operations/Operation.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/library/src/containers/Operations/Operation.tsx b/library/src/containers/Operations/Operation.tsx index cb1b76bf6..a2ded6b0d 100644 --- a/library/src/containers/Operations/Operation.tsx +++ b/library/src/containers/Operations/Operation.tsx @@ -40,7 +40,9 @@ export const Operation: React.FunctionComponent = (props) => { channel.parameters() !== undefined ? SchemaHelpers.parametersToSchema(channel.parameters()) : undefined; - + // Construct the full relative URL, including path, query parameters to avoid path overwrite when + // location.hash is included + const relativePathname = `${window.location.pathname}${window.location.search}`; return (
@@ -53,7 +55,7 @@ export const Operation: React.FunctionComponent = (props) => { {servers.map((server) => (
  • Date: Tue, 25 Mar 2025 14:38:53 +0100 Subject: [PATCH 2/2] added relative link to reply component --- library/src/containers/Operations/Operation.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/library/src/containers/Operations/Operation.tsx b/library/src/containers/Operations/Operation.tsx index a2ded6b0d..db4b3d1cd 100644 --- a/library/src/containers/Operations/Operation.tsx +++ b/library/src/containers/Operations/Operation.tsx @@ -23,6 +23,10 @@ interface Props { channel: ChannelInterface; } +// Construct the full relative URL, including path, query parameters to avoid path overwrite when +// location.hash is included +const relativePathname = `${window.location.pathname}${window.location.search}`; + export const Operation: React.FunctionComponent = (props) => { const { type = PayloadType.SEND, operation, channelName, channel } = props; const config = useConfig(); @@ -40,9 +44,6 @@ export const Operation: React.FunctionComponent = (props) => { channel.parameters() !== undefined ? SchemaHelpers.parametersToSchema(channel.parameters()) : undefined; - // Construct the full relative URL, including path, query parameters to avoid path overwrite when - // location.hash is included - const relativePathname = `${window.location.pathname}${window.location.search}`; return (
    @@ -408,7 +409,7 @@ export const OperationReplyChannelInfo: React.FunctionComponent = ({ {servers.map((server) => (