refactor(Board): dont show err instead

This commit is contained in:
Timothy Z. 2025-01-03 15:41:44 +02:00
parent c65b10e915
commit 2288bd27d0

View file

@ -57,29 +57,12 @@ const Board = () => {
{board.catalogs.map((catalog, index) => {
switch (catalog.content?.type) {
case 'Ready': {
if (catalog.content.content.length > 0) {
return (
<MetaRow
key={index}
className={classnames(
styles['board-row'],
styles[`board-row-${catalog.content.content[0].posterShape}`],
'animation-fade-in'
)}
catalog={catalog}
itemComponent={MetaItem}
/>
);
}
return null;
}
case 'Err': {
return (
<MetaRow
key={index}
className={classnames(styles['board-row'], 'animation-fade-in')}
className={classnames(styles['board-row'], styles[`board-row-${catalog.content.content[0].posterShape}`], 'animation-fade-in')}
catalog={catalog}
message={catalog.content.content}
itemComponent={MetaItem}
/>
);
}