aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/ui/Link.js
diff options
context:
space:
mode:
authorLibravatar Markus Hatvan <markus_hatvan@aon.at>2021-09-13 14:45:46 +0200
committerLibravatar GitHub <noreply@github.com>2021-09-13 14:45:46 +0200
commit537697a6e9757f118d09d9e76362ba1ff617e2c6 (patch)
treebc55447115e385137684e84697a8c15d2199b8d5 /src/components/ui/Link.js
parentBumped up version to: 5.6.3-nightly.0 [skip ci] (diff)
downloadferdium-app-537697a6e9757f118d09d9e76362ba1ff617e2c6.tar.gz
ferdium-app-537697a6e9757f118d09d9e76362ba1ff617e2c6.tar.zst
ferdium-app-537697a6e9757f118d09d9e76362ba1ff617e2c6.zip
chore: upgrade intl dependencies (#1920)
Diffstat (limited to 'src/components/ui/Link.js')
-rw-r--r--src/components/ui/Link.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/components/ui/Link.js b/src/components/ui/Link.js
index 003211e5c..94db3f842 100644
--- a/src/components/ui/Link.js
+++ b/src/components/ui/Link.js
@@ -9,7 +9,9 @@ import { matchRoute } from '../../helpers/routing-helpers';
9import { openExternalUrl } from '../../helpers/url-helpers'; 9import { openExternalUrl } from '../../helpers/url-helpers';
10 10
11// TODO: create container component for this component 11// TODO: create container component for this component
12export default @inject('stores') @observer class Link extends Component { 12@inject('stores')
13@observer
14class Link extends Component {
13 onClick(e) { 15 onClick(e) {
14 if (this.props.disabled) { 16 if (this.props.disabled) {
15 e.preventDefault(); 17 e.preventDefault();
@@ -50,7 +52,7 @@ export default @inject('stores') @observer class Link extends Component {
50 href={router.history.createHref(to)} 52 href={router.history.createHref(to)}
51 className={linkClasses} 53 className={linkClasses}
52 style={style} 54 style={style}
53 onClick={(e) => this.onClick(e)} 55 onClick={e => this.onClick(e)}
54 > 56 >
55 {children} 57 {children}
56 </a> 58 </a>
@@ -62,10 +64,8 @@ Link.wrappedComponent.propTypes = {
62 stores: PropTypes.shape({ 64 stores: PropTypes.shape({
63 router: PropTypes.instanceOf(RouterStore).isRequired, 65 router: PropTypes.instanceOf(RouterStore).isRequired,
64 }).isRequired, 66 }).isRequired,
65 children: PropTypes.oneOfType([ 67 children: PropTypes.oneOfType([oneOrManyChildElements, PropTypes.string])
66 oneOrManyChildElements, 68 .isRequired,
67 PropTypes.string,
68 ]).isRequired,
69 to: PropTypes.string.isRequired, 69 to: PropTypes.string.isRequired,
70 className: PropTypes.string, 70 className: PropTypes.string,
71 activeClassName: PropTypes.string, 71 activeClassName: PropTypes.string,
@@ -83,3 +83,5 @@ Link.wrappedComponent.defaultProps = {
83 target: '', 83 target: '',
84 style: {}, 84 style: {},
85}; 85};
86
87export default Link;