diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2020-09-01 11:32:55 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2020-09-01 11:32:55 +0200 |
| commit | 8334f1ca8dcf1e5fb4e062fd45c0e96ad3759c70 (patch) | |
| tree | 262f3ea83dc8ee19ac83c14145248598a237a8dc | |
| parent | 00445d33a30ed538f9512af7b354d155a4063311 (diff) | |
| parent | e88ab5940e9269c0f2814728062e31ce95f797d7 (diff) | |
| download | mullvadvpn-8334f1ca8dcf1e5fb4e062fd45c0e96ad3759c70.tar.xz mullvadvpn-8334f1ca8dcf1e5fb4e062fd45c0e96ad3759c70.zip | |
Merge branch 'fix-copied-to-clipboard-translation' into master
| -rw-r--r-- | gui/src/renderer/components/ClipboardLabel.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gui/src/renderer/components/ClipboardLabel.tsx b/gui/src/renderer/components/ClipboardLabel.tsx index e0a507cc48..8b96b32dd3 100644 --- a/gui/src/renderer/components/ClipboardLabel.tsx +++ b/gui/src/renderer/components/ClipboardLabel.tsx @@ -8,7 +8,7 @@ interface IProps { value: string; displayValue?: string; delay: number; - message: string; + message?: string; className?: string; } @@ -23,7 +23,6 @@ const Label = styled.span({ export default class ClipboardLabel extends React.Component<IProps, IState> { public static defaultProps: Partial<IProps> = { delay: 3000, - message: messages.gettext('COPIED TO CLIPBOARD!'), }; public state: IState = { @@ -37,10 +36,11 @@ export default class ClipboardLabel extends React.Component<IProps, IState> { } public render() { - const displayValue = this.props.displayValue || this.props.value; + const message = this.props.message ?? messages.gettext('COPIED TO CLIPBOARD!'); + const displayValue = this.props.displayValue ?? this.props.value; return ( <Label className={this.props.className} onClick={this.handlePress}> - {this.state.showsMessage ? this.props.message : displayValue} + {this.state.showsMessage ? message : displayValue} </Label> ); } |
