[Glitch] Update design of Collections list page
Port 3d5cb624ba to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
1 parent
44394878a4
commit
b08e2b8e60
12 files changed
+300
-119
No files matched your search
@@ -1,8 +1,10 @@
|
||||
import type { ComponentPropsWithoutRef } from 'react';
|
||||
import { Children, forwardRef } from 'react';
|
||||
import { forwardRef } from 'react';
|
||||
|
||||
import classNames from 'classnames';
|
||||
|
||||
import { hasReactChildren } from '@/flavours/glitch/utils/has_react_children';
|
||||
|
||||
import { LoadingIndicator } from '../loading_indicator';
|
||||
|
||||
export const Scrollable = forwardRef<
|
||||
@@ -36,7 +38,7 @@ export const ItemList = forwardRef<
|
||||
emptyMessage?: React.ReactNode;
|
||||
}
|
||||
>(({ isLoading, emptyMessage, className, children, ...otherProps }, ref) => {
|
||||
if (!isLoading && Children.count(children) === 0 && emptyMessage) {
|
||||
if (!isLoading && !hasReactChildren(children) && emptyMessage) {
|
||||
return (
|
||||
<div className='empty-column-indicator'>
|
||||
<span>{emptyMessage}</span>
|
||||
|
||||
Reference in new issue
Block a user