Skip to content

Commit 8dad8a3

Browse files
committed
1 parent 5be1ef7 commit 8dad8a3

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

www/src/js/views/hocs/makeResponsive.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export interface WithBreakpoint {
88
matchBreakpoint: boolean;
99
}
1010

11-
function makeResponsive<Props>(
11+
function makeResponsive<Props extends WithBreakpoint>(
1212
WrappedComponent: React.ComponentType<Props>,
1313
mediaQuery: string | QueryObject | QueryObject[],
1414
): React.ComponentType<Omit<Props, keyof WithBreakpoint>> {
@@ -43,8 +43,11 @@ function makeResponsive<Props>(
4343
};
4444

4545
render() {
46-
// @ts-ignore TODO: Figure out what's wrong here
47-
return <WrappedComponent matchBreakpoint={this.state.matchBreakpoint} {...this.props} />;
46+
return (
47+
// TODO: remove as Props hack as defined in:
48+
// https://github.com/Microsoft/TypeScript/issues/28938#issuecomment-450636046
49+
<WrappedComponent {...this.props as Props} matchBreakpoint={this.state.matchBreakpoint} />
50+
);
4851
}
4952
};
5053
}

www/src/js/views/hocs/withTimer.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ function withTimer<Props extends TimerData>(
5353
};
5454

5555
render() {
56-
// @ts-ignore TODO: Figure out what's wrong here
57-
return <WrappedComponent {...this.state} {...this.props} />;
56+
// TODO: remove as Props hack as defined in:
57+
// https://github.com/Microsoft/TypeScript/issues/28938#issuecomment-450636046
58+
return <WrappedComponent {...this.state} {...this.props as Props} />;
5859
}
5960
};
6061
}

0 commit comments

Comments
 (0)