kaori 3 лет назад
Родитель
Сommit
1c0411c802
1 измененных файлов с 0 добавлено и 24 удалено
  1. 0 24
      packages/app/src/components/SuspenseUtils.jsx

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

@@ -1,24 +0,0 @@
-/* eslint-disable import/prefer-default-export */
-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 (
-    // wrap with <Suspense></Suspense>
-      <Suspense
-        fallback={(
-          <div className="my-5 text-center">
-            <i className="fa fa-lg fa-spinner fa-pulse mx-auto text-muted"></i>
-          </div>
-        )}
-      >
-        <Component {...props} />
-      </Suspense>
-    );
-  });
-}