Remove unused FeaturedProject.state.show

Change-type: patch
This commit is contained in:
Alexis Svinartchouk 2020-08-25 19:19:01 +02:00
parent a17a919c37
commit 8ed5ff25a5

View File

@ -28,10 +28,9 @@ interface FeaturedProjectProps {
interface FeaturedProjectState { interface FeaturedProjectState {
endpoint: string | null; endpoint: string | null;
show: boolean;
} }
export class FeaturedProject extends React.Component< export class FeaturedProject extends React.PureComponent<
FeaturedProjectProps, FeaturedProjectProps,
FeaturedProjectState FeaturedProjectState
> { > {
@ -39,7 +38,6 @@ export class FeaturedProject extends React.Component<
super(props); super(props);
this.state = { this.state = {
endpoint: null, endpoint: null,
show: false,
}; };
} }
@ -58,16 +56,8 @@ export class FeaturedProject extends React.Component<
} }
public render() { public render() {
const { style = {} } = this.props;
return this.state.endpoint ? ( return this.state.endpoint ? (
<SafeWebview <SafeWebview src={this.state.endpoint} {...this.props} />
src={this.state.endpoint}
style={{
display: this.state.show ? 'block' : 'none',
...style,
}}
{...this.props}
></SafeWebview>
) : null; ) : null;
} }
} }