Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified
raw
history blame
444 Bytes
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { isSpecialClick } from '../core/utils';
export default class Link extends Component {
static propTypes = {
onClick: PropTypes.func.isRequired,
};
onClick = (e) => {
if (isSpecialClick(e)) {
return;
}
this.props.onClick();
e.preventDefault();
};
render() {
return <a {...this.props} onClick={this.onClick} />;
}
}