Skip to content

Commit eda0f18

Browse files
committed
Ignore typing error
1 parent c3a4df3 commit eda0f18

File tree

1 file changed

+6
-3
lines changed
  • packages/app/src/app/components/Preview

1 file changed

+6
-3
lines changed

packages/app/src/app/components/Preview/index.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,9 @@ class BasePreview extends React.Component<Props, State> {
754754
return null;
755755
}
756756

757+
// Weird TS typing bug
758+
const AnySpring = Spring as any;
759+
757760
return (
758761
<Container
759762
className={className}
@@ -787,13 +790,13 @@ class BasePreview extends React.Component<Props, State> {
787790
)}
788791
{overlayMessage && <Loading>{overlayMessage}</Loading>}
789792

790-
<Spring
793+
<AnySpring
791794
from={{ opacity: 0 }}
792795
to={{
793796
opacity: this.state.showScreenshot ? 0 : 1,
794797
}}
795798
>
796-
{style => (
799+
{(style: { opacity: number }) => (
797800
<React.Fragment>
798801
<StyledFrame
799802
sandbox="allow-forms allow-scripts allow-same-origin allow-modals allow-popups allow-presentation"
@@ -848,7 +851,7 @@ class BasePreview extends React.Component<Props, State> {
848851
)}
849852
</React.Fragment>
850853
)}
851-
</Spring>
854+
</AnySpring>
852855
</Container>
853856
);
854857
}

0 commit comments

Comments
 (0)