Skip to content

Commit

Permalink
feat(): add comments explaning flow
Browse files Browse the repository at this point in the history
  • Loading branch information
michal-grzelak committed Jul 28, 2023
1 parent 48e5ef1 commit 5fe214e
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,27 +56,32 @@ export const EmbeddedSigningAction: FC<EmbeddedSigningActionActionProps> = ({
}
}, [event, finishSigning, isFinished])

// this window is iframe content -> render only messager
if (isIframe) {
return <IFrameMessager iframeEvent={iframeEvent} setEvent={setEvent} />
}

// this window is extension content -> render messager and extension
return (
<>
<IFrameMessager iframeEvent={iframeEvent} setEvent={setEvent} />

<div
// if iframe is loaded -> fill screen
className={`${classes.wrapper} ${
isIframeLoaded ? classes['flex-full'] : ''
}`}
>
{!isFinished ? (
{isFinished ? (
// signing process is finished -> display messsage
<FinishedMessage event={event} finishSigning={finishSigning} />
) : (
// signing process incomplete (or user refreshed page) -> display signing process
<SigningProcess
signUrl={decodedSignUrl}
isIframeLoaded={isIframeLoaded}
setIsIframeLoaded={setIsIframeLoaded}
/>
) : (
<FinishedMessage event={event} finishSigning={finishSigning} />
)}
</div>
</>
Expand Down

0 comments on commit 5fe214e

Please sign in to comment.