mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-19 09:16:38 +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 {
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user