Skip to content

Commit 8626ac8

Browse files
committed
migration
1 parent f9e3540 commit 8626ac8

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// @flow
2-
31
import withSuspense from './withSuspense';
42

53
export default withSuspense;

front/src/hoc/withSuspense/withSuspense.js renamed to front/src/hoc/withSuspense/withSuspense.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
// @flow
2-
3-
// #region imports
41
import React, { Component, Suspense } from 'react';
2+
// @ts-ignore
53
import wrapDisplayName from 'recompose/wrapDisplayName';
64
import LoadingContent from '../../components/loadingContent';
7-
// #endregion
85

96
// #region flow types
107
type Props = any;
@@ -27,9 +24,13 @@ function withSuspense() {
2724
}
2825

2926
/* eslint-disable no-process-env */
27+
// @ts-ignore
3028
if (process.env.NODE_ENV !== 'production') {
3129
// HOC would obfuscate component name, this trick is helpful for dev (we don't care in production)
32-
WithSuspense.displayName = wrapDisplayName(BaseComponent, 'withSuspense');
30+
(WithSuspense as any).displayName = wrapDisplayName(
31+
BaseComponent,
32+
'withSuspense',
33+
);
3334
}
3435
/* eslint-enable no-process-env */
3536

0 commit comments

Comments
 (0)