mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-19 01:06:36 +00:00
Remove unused FeaturedProject.state.show
Change-type: patch
This commit is contained in:
parent
a17a919c37
commit
8ed5ff25a5
@ -28,10 +28,9 @@ interface FeaturedProjectProps {
|
||||
|
||||
interface FeaturedProjectState {
|
||||
endpoint: string | null;
|
||||
show: boolean;
|
||||
}
|
||||
|
||||
export class FeaturedProject extends React.Component<
|
||||
export class FeaturedProject extends React.PureComponent<
|
||||
FeaturedProjectProps,
|
||||
FeaturedProjectState
|
||||
> {
|
||||
@ -39,7 +38,6 @@ export class FeaturedProject extends React.Component<
|
||||
super(props);
|
||||
this.state = {
|
||||
endpoint: null,
|
||||
show: false,
|
||||
};
|
||||
}
|
||||
|
||||
@ -58,16 +56,8 @@ export class FeaturedProject extends React.Component<
|
||||
}
|
||||
|
||||
public render() {
|
||||
const { style = {} } = this.props;
|
||||
return this.state.endpoint ? (
|
||||
<SafeWebview
|
||||
src={this.state.endpoint}
|
||||
style={{
|
||||
display: this.state.show ? 'block' : 'none',
|
||||
...style,
|
||||
}}
|
||||
{...this.props}
|
||||
></SafeWebview>
|
||||
<SafeWebview src={this.state.endpoint} {...this.props} />
|
||||
) : null;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user