mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-06-19 17:01:07 +00:00
Update frontend dependencies (#498)
* update npm packages * update tsconfig * remove babelrc, babel presets as well as stable package * fix svg namespace tag syntax errors * fix reference error due to namespace and class component having same name * replace tslint with eslint * make eslint happier * update .nvmrc to 14 * update node version to 14 in gh workflow * fix eslint warnings due to warnings treated as errors on CI (process.env.CI = true) * pretty fix * bump node version in Dockerfile * use createRoot instead of react-dom render * update browsers list in package.json
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
import * as React from 'react';
|
||||
import { Types, Maybe } from '../../common';
|
||||
import { formatNumber, secondsWithPrecision } from '../../utils';
|
||||
import { Tab, Chain } from './';
|
||||
import { Tab, ChainDisplay } from './';
|
||||
import { Tile, Ago } from '../';
|
||||
|
||||
import blockIcon from '../../icons/cube.svg';
|
||||
@@ -27,24 +27,21 @@ import lastTimeIcon from '../../icons/watch.svg';
|
||||
import listIcon from '../../icons/list-alt-regular.svg';
|
||||
import worldIcon from '../../icons/location.svg';
|
||||
import settingsIcon from '../../icons/settings.svg';
|
||||
import consensusIcon from '../../icons/cube-alt.svg';
|
||||
import statsIcon from '../../icons/graph.svg';
|
||||
|
||||
import './Header.css';
|
||||
|
||||
export namespace Header {
|
||||
export interface Props {
|
||||
best: Types.BlockNumber;
|
||||
finalized: Types.BlockNumber;
|
||||
blockTimestamp: Types.Timestamp;
|
||||
blockAverage: Maybe<Types.Milliseconds>;
|
||||
currentTab: Chain.Display;
|
||||
setDisplay: (display: Chain.Display) => void;
|
||||
}
|
||||
interface HeaderProps {
|
||||
best: Types.BlockNumber;
|
||||
finalized: Types.BlockNumber;
|
||||
blockTimestamp: Types.Timestamp;
|
||||
blockAverage: Maybe<Types.Milliseconds>;
|
||||
currentTab: ChainDisplay;
|
||||
setDisplay: (display: ChainDisplay) => void;
|
||||
}
|
||||
|
||||
export class Header extends React.Component<Header.Props, {}> {
|
||||
public shouldComponentUpdate(nextProps: Header.Props) {
|
||||
export class Header extends React.Component<HeaderProps> {
|
||||
public shouldComponentUpdate(nextProps: HeaderProps) {
|
||||
return (
|
||||
this.props.best !== nextProps.best ||
|
||||
this.props.finalized !== nextProps.finalized ||
|
||||
|
||||
Reference in New Issue
Block a user