File tree Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ const CLink = props => {
4444 < a
4545 href = { href || '#' }
4646 className = { classes }
47+ rel = { rest . target === '_blank' && 'noopener norefferer' }
4748 { ...rest }
4849 onClick = { click }
4950 ref = { innerRef }
@@ -63,17 +64,17 @@ CLink.propTypes = {
6364 to : PropTypes . oneOfType ( [ PropTypes . object , PropTypes . string , PropTypes . func ] )
6465} ;
6566
66- CLink . sortAttributes = ( attributesToSort ) => {
67- const attributes = { }
68- const linkProps = { }
69- Object . entries ( attributesToSort || { } ) . forEach ( ( [ key , value ] ) => {
70- if ( Object . keys ( CLink . propTypes ) . includes ( key ) ) {
71- linkProps [ key ] = value
72- } else {
73- attributes [ key ] = value
74- }
75- } )
76- return { linkProps, attributes }
77- }
67+ // CLink.sortAttributes = (attributesToSort) => {
68+ // const attributes = {}
69+ // const linkProps = {}
70+ // Object.entries(attributesToSort || {}).forEach(([key, value]) => {
71+ // if (Object.keys(CLink.propTypes).includes(key)) {
72+ // linkProps[key] = value
73+ // } else {
74+ // attributes[key] = value
75+ // }
76+ // })
77+ // return { linkProps, attributes }
78+ // }
7879
7980export default CLink
You can’t perform that action at this time.
0 commit comments