itizawa 5 лет назад
Родитель
Сommit
8b8f859e1e
1 измененных файлов с 0 добавлено и 36 удалено
  1. 0 36
      src/client/js/components/FakeApi.jsx

+ 0 - 36
src/client/js/components/FakeApi.jsx

@@ -1,36 +0,0 @@
-
-function wrapPromise() {
-  let status = 'pending';
-  let result;
-
-  return {
-    read(promise) {
-      if (status === 'pending') {
-        throw promise.then(
-          (r) => {
-            status = 'success';
-            result = r;
-          },
-          (e) => {
-            status = 'error';
-            result = e;
-          },
-        );
-      }
-      else if (status === 'error') {
-        throw result;
-      }
-      else if (status === 'success') {
-        return result;
-      }
-    },
-  };
-}
-
-function fetchProfileData() {
-
-  return wrapPromise();
-}
-
-
-export default fetchProfileData;