Commit 4f8231e0 authored by Steffen Vogel's avatar Steffen Vogel 🎅🏼
Browse files

Merge branch 'fix-href-warnings' into 'develop'

fix invalid href warnings for anchor elements

See merge request acs/public/villas/VILLASweb!45
parents b659076c 3fcb30bd
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { FormControl } from 'react-bootstrap'; import { FormControl, Button } from 'react-bootstrap';
import Icon from './icon'; import Icon from './icon';
class EditableHeader extends React.Component { class EditableHeader extends React.Component {
...@@ -85,8 +85,8 @@ class EditableHeader extends React.Component { ...@@ -85,8 +85,8 @@ class EditableHeader extends React.Component {
<FormControl type='text' bsSize='large' value={this.state.title} onChange={this.onChange} style={editStyle} autoFocus /> <FormControl type='text' bsSize='large' value={this.state.title} onChange={this.onChange} style={editStyle} autoFocus />
</form> </form>
<a href={'#'} onClick={this.save}><Icon icon='check' style={iconStyle} /></a> <Button bsStyle="link" onClick={this.save}><Icon icon='check' style={iconStyle} /></Button>
<a href={'#'} onClick={this.cancel}><Icon icon='times' style={iconStyle} /></a> <Button bsStyle="link" onClick={this.cancel}><Icon icon='times' style={iconStyle} /></Button>
</div>; </div>;
} }
...@@ -95,7 +95,7 @@ class EditableHeader extends React.Component { ...@@ -95,7 +95,7 @@ class EditableHeader extends React.Component {
{this.state.title} {this.state.title}
</h1> </h1>
<a href={'#'} onClick={this.edit}><Icon icon='edit' style={iconStyle} /></a> <Button bsStyle="link" onClick={this.edit}><Icon icon='edit' style={iconStyle} /></Button>
</div>; </div>;
} }
} }
......
...@@ -74,7 +74,7 @@ class CustomTable extends Component { ...@@ -74,7 +74,7 @@ class CustomTable extends Component {
if (linkKey && data[linkKey] != null) { if (linkKey && data[linkKey] != null) {
cell.push(<Link to={child.props.link + data[linkKey]}>{content}</Link>); cell.push(<Link to={child.props.link + data[linkKey]}>{content}</Link>);
} else if (child.props.clickable) { } else if (child.props.clickable) {
cell.push(<a href={'#'} onClick={() => child.props.onClick(index)}>{content}</a>); cell.push(<Button bsStyle="link" onClick={() => child.props.onClick(index)}>{content}</Button>);
} else { } else {
cell.push(content); cell.push(content);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment