Skip to content

Commit

Permalink
fix: reply channel displayed correctly (#856)
Browse files Browse the repository at this point in the history
Co-authored-by: Lukasz Gornicki <[email protected]>
  • Loading branch information
GreenRover and derberg authored Dec 18, 2023
1 parent 75fc40d commit 36df7d1
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions library/src/containers/Operations/Operation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ export const OperationReplyInfo: React.FunctionComponent<Props> = props => {
showChannel ? 'block' : 'hidden'
}`}
>
<OperationChannelInfo {...props} />{' '}
<OperationReplyChannelInfo {...props} />{' '}
</div>
)}
</div>
Expand Down Expand Up @@ -424,18 +424,24 @@ export const OperationReplyInfo: React.FunctionComponent<Props> = props => {
);
};

export const OperationChannelInfo: React.FunctionComponent<Props> = ({
export const OperationReplyChannelInfo: React.FunctionComponent<Props> = ({
type = PayloadType.SEND,
channelName,
channel,
operation,
}) => {
const reply = operation.reply();

const channel = reply?.channel();

const channelName = channel?.address() ?? '';

const config = useConfig();
const servers =
typeof channel.servers === 'function' && channel.servers().all();
typeof channel?.servers === 'function' && channel.servers().all();
const parameters =
channel.parameters() !== undefined
channel?.parameters() !== undefined
? SchemaHelpers.parametersToSchema(channel.parameters())
: undefined;

if (!channel) {
return <></>;
}
Expand Down

0 comments on commit 36df7d1

Please sign in to comment.