kaori 3 лет назад
Родитель
Сommit
a632ff8614

+ 4 - 1
packages/app/src/components/PageEditor/PreviewWithSuspense.jsx

@@ -1,9 +1,12 @@
 import React from 'react';
+
 import PropTypes from 'prop-types';
-import Preview from './Preview';
 
+// TODO: Omit withLoadingSppiner
 import { withLoadingSppiner } from '../SuspenseUtils';
 
+import Preview from './Preview';
+
 function PagePreview(props) {
   if (props.markdown == null || props.pagePath == null) {
     if (props.error !== '') {

+ 1 - 0
packages/app/src/components/SuspenseUtils.jsx

@@ -5,6 +5,7 @@ import React, { Suspense } from 'react';
  * If you throw a Promise in the component, it will display a sppiner
  * @param {object} Component A React.Component or functional component
  */
+// TODO: Omit withLoadingSppiner
 export function withLoadingSppiner(Component) {
   return (props => function getWithLoadingSpinner() {
     return (