feat: connect donation sats api, build donation sat skeleton, build donation sats mock api

This commit is contained in:
MTG2000
2022-05-25 15:47:58 +03:00
parent f1f0be7f79
commit f56e269148
15 changed files with 192 additions and 65 deletions

View File

@@ -1,4 +1,4 @@
import React, { ComponentProps, ComponentType, Suspense } from "react";
import React, { ComponentProps, ComponentType, ReactNode, Suspense } from "react";
import { RotatingLines } from "react-loader-spinner";
export function random(min: number, max: number) {
@@ -85,3 +85,8 @@ export function shuffle<T>(_array: Array<T>) {
return array;
}
export function generateList(component: React.ReactElement, cnt: number) {
return Array(cnt).fill(0).map((_, idx) => React.cloneElement(component, { key: idx }))
}