mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-05-06 10:07:58 +00:00
Never update Icons
This commit is contained in:
@@ -8,6 +8,16 @@ export interface Props {
|
||||
className?: string,
|
||||
};
|
||||
|
||||
export function Icon(props: Props) {
|
||||
return <ReactSVG title={props.alt} className={`Icon ${ props.className || '' }`} path={props.src} />;
|
||||
export class Icon extends React.Component<{}, Props> {
|
||||
public props: Props;
|
||||
|
||||
public shouldComponentUpdate() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public render() {
|
||||
const { alt, className, src } = this.props;
|
||||
|
||||
return <ReactSVG title={alt} className={`Icon ${ className || '' }`} path={src} />;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user