summaryrefslogtreecommitdiffhomepage
path: root/gui/src/renderer
diff options
context:
space:
mode:
Diffstat (limited to 'gui/src/renderer')
-rw-r--r--gui/src/renderer/components/AppButton.tsx2
-rw-r--r--gui/src/renderer/components/LocationList.tsx14
-rw-r--r--gui/src/renderer/components/SvgMap.tsx6
-rw-r--r--gui/src/renderer/redux/store.ts1
4 files changed, 14 insertions, 9 deletions
diff --git a/gui/src/renderer/components/AppButton.tsx b/gui/src/renderer/components/AppButton.tsx
index 212e5cb1a3..d31194e072 100644
--- a/gui/src/renderer/components/AppButton.tsx
+++ b/gui/src/renderer/components/AppButton.tsx
@@ -183,7 +183,7 @@ export class BlockingButton extends Component<IBlockingProps, IBlockingState> {
public render() {
return React.Children.map(this.props.children, (child) => {
if (React.isValidElement(child)) {
- return React.cloneElement(child as React.ReactElement<any>, {
+ return React.cloneElement(child as React.ReactElement, {
...child.props,
disabled: this.state.isBlocked || this.props.disabled,
onPress: this.onPress,
diff --git a/gui/src/renderer/components/LocationList.tsx b/gui/src/renderer/components/LocationList.tsx
index a86ae25897..2acb1adf66 100644
--- a/gui/src/renderer/components/LocationList.tsx
+++ b/gui/src/renderer/components/LocationList.tsx
@@ -248,10 +248,10 @@ interface IRelayLocationsProps {
onExpand?: (location: RelayLocation, expand: boolean) => void;
}
-interface ICommonCellProps {
+interface ICommonCellProps<T> {
location: RelayLocation;
selected: boolean;
- ref?: React.Ref<any>;
+ ref?: React.Ref<T>;
}
export class RelayLocations extends Component<IRelayLocationsProps> {
@@ -269,7 +269,7 @@ export class RelayLocations extends Component<IRelayLocationsProps> {
expanded={this.isExpanded(countryLocation)}
onSelect={this.handleSelection}
onExpand={this.handleExpand}
- {...this.getCommonCellProps(countryLocation)}>
+ {...this.getCommonCellProps<CountryRow>(countryLocation)}>
{relayCountry.cities.map((relayCity) => {
const cityLocation: RelayLocation = {
city: [relayCountry.code, relayCity.code],
@@ -283,7 +283,7 @@ export class RelayLocations extends Component<IRelayLocationsProps> {
expanded={this.isExpanded(cityLocation)}
onSelect={this.handleSelection}
onExpand={this.handleExpand}
- {...this.getCommonCellProps(cityLocation)}>
+ {...this.getCommonCellProps<CityRow>(cityLocation)}>
{relayCity.relays.map((relay) => {
const relayLocation: RelayLocation = {
hostname: [relayCountry.code, relayCity.code, relay.hostname],
@@ -295,7 +295,7 @@ export class RelayLocations extends Component<IRelayLocationsProps> {
active={relay.active}
hostname={relay.hostname}
onSelect={this.handleSelection}
- {...this.getCommonCellProps(relayLocation)}
+ {...this.getCommonCellProps<RelayRow>(relayLocation)}
/>
);
})}
@@ -333,12 +333,12 @@ export class RelayLocations extends Component<IRelayLocationsProps> {
}
};
- private getCommonCellProps(location: RelayLocation): ICommonCellProps {
+ private getCommonCellProps<T>(location: RelayLocation): ICommonCellProps<T> {
const selected = this.isSelected(location);
const ref =
selected && this.props.selectedElementRef ? this.props.selectedElementRef : undefined;
- return { ref, selected, location };
+ return { ref: ref as React.Ref<T>, selected, location };
}
}
diff --git a/gui/src/renderer/components/SvgMap.tsx b/gui/src/renderer/components/SvgMap.tsx
index 3f715a434e..4884e57861 100644
--- a/gui/src/renderer/components/SvgMap.tsx
+++ b/gui/src/renderer/components/SvgMap.tsx
@@ -182,7 +182,11 @@ export default class SvgMap extends React.Component<IProps, IState> {
);
}
- private mergeRsmStyle(style: { [key: string]: any }) {
+ private mergeRsmStyle(style: {
+ default?: React.CSSProperties;
+ hover?: React.CSSProperties;
+ pressed?: React.CSSProperties;
+ }) {
const defaultStyle = style.default || {};
return {
default: defaultStyle,
diff --git a/gui/src/renderer/redux/store.ts b/gui/src/renderer/redux/store.ts
index e1324607dc..3af628ccd4 100644
--- a/gui/src/renderer/redux/store.ts
+++ b/gui/src/renderer/redux/store.ts
@@ -61,6 +61,7 @@ export default function configureStore(
};
const composeEnhancers: typeof compose = (() => {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
const reduxCompose = window && (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;
if (process.env.NODE_ENV === 'development' && reduxCompose) {
return reduxCompose({ actionCreators });