Skip to content

Commit

Permalink
removed conditional hook
Browse files Browse the repository at this point in the history
  • Loading branch information
AceTheCreator committed Sep 20, 2023
1 parent fd3a6ec commit e9a9225
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/src/containers/Operations/Operation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,11 @@ export const OperationInfo: React.FunctionComponent<Props> = props => {

export const OperationReplyInfo: React.FunctionComponent<Props> = props => {
const { type = PayloadType.SEND, operation } = props;
const config = useConfig();
const [showMessages, setShowMessages] = useState(false);
if (type !== PayloadType.REPLY && type !== PayloadType.REQUEST) return <></>;
const reply = operation.reply();
if (reply === undefined) return <></>;
const config = useConfig();
const { typeLabel } = getTypeInformation({ type, config });
console.log(typeLabel);
const replyMessages = reply.messages();
Expand Down Expand Up @@ -370,10 +370,10 @@ export const OperationReplyAddressInfo: React.FunctionComponent<Props> = ({
type = PayloadType.SEND,
operation,
}) => {
const config = useConfig();
if (type !== PayloadType.REPLY && type !== PayloadType.REQUEST) return <></>;
const reply = operation.reply();
if (reply === undefined || !reply.hasAddress()) return <></>;
const config = useConfig();
const { typeLabel } = getTypeInformation({ type, config });
const replyAddress = reply.address()!;
const replyAddressLocation = replyAddress.location();
Expand Down

0 comments on commit e9a9225

Please sign in to comment.