Update design of Collections list page (#38822)

This commit is contained in:
diondiondion authored and GitHub committed 2026-04-28 11:32:27 +00:00
1 parent 1f1653e039
commit 3d5cb624ba
13 files changed
+305 -122

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 '@/mastodon/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>