feat: comment card component, update post comments api fields

This commit is contained in:
MTG2000
2022-04-25 19:02:58 +03:00
parent 123374d844
commit 2b0d2c174c
12 changed files with 144 additions and 64 deletions

View File

@@ -52,11 +52,9 @@ export function lazyModal<T extends ComponentType<any>>
<C direction={!LoadingComponent && direction} {...props} />
</Suspense>
// type ThenArg<T> = T extends PromiseLike<infer U> ? U : T
// type y = ThenArg<ReturnType<typeof x>>
// type yy = ComponentProps<y['default']>
return { LazyComponent, preload };
}
export function trimText(text: string, length: number) {
return text.slice(0, length) + (text.length > length ? "..." : "")
}