mirror of
https://github.com/aljazceru/landscape-template.git
synced 2026-01-31 12:14:30 +01:00
feat: comment card component, update post comments api fields
This commit is contained in:
@@ -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 ? "..." : "")
|
||||
}
|
||||
Reference in New Issue
Block a user