diff --git a/addon/web/client/src/components/ViewFlow.tsx b/addon/web/client/src/components/ViewFlow.tsx index 1d0f685..68841eb 100644 --- a/addon/web/client/src/components/ViewFlow.tsx +++ b/addon/web/client/src/components/ViewFlow.tsx @@ -17,6 +17,7 @@ interface Iprops { interface IState { flowTab: 'Headers' | 'Preview' | 'Response' + copied: boolean } class ViewFlow extends React.Component { @@ -25,6 +26,7 @@ class ViewFlow extends React.Component { this.state = { flowTab: 'Headers', + copied: false, } } @@ -98,7 +100,7 @@ class ViewFlow extends React.Component { { !(flowTab === 'Headers') ? null :
-

+ + this.setState({ copied: true }, () => { + setTimeout(() => { + this.setState({ copied: false }) + }, 1000) + }) + + }}>{ this.state.copied ? 'Copied' : 'Copy as cURL' }

General