checks for catalogs which are not yet started to load

This commit is contained in:
nklhrstv 2022-05-19 16:24:07 +03:00
parent fe216a3bd1
commit 435ebdb3fa
2 changed files with 4 additions and 4 deletions

View file

@ -52,7 +52,7 @@ const Board = () => {
null
}
{board.catalogs.map((catalog, index) => {
switch (catalog.content.type) {
switch (catalog.content?.type) {
case 'Ready': {
return (
<MetaRow
@ -76,7 +76,7 @@ const Board = () => {
/>
);
}
case 'Loading': {
default: {
return (
<MetaRow.Placeholder
key={index}

View file

@ -69,7 +69,7 @@ const Search = ({ queryParams }) => {
</div>
:
search.catalogs.map((catalog, index) => {
switch (catalog.content.type) {
switch (catalog.content?.type) {
case 'Ready': {
return (
<MetaRow
@ -93,7 +93,7 @@ const Search = ({ queryParams }) => {
/>
);
}
case 'Loading': {
default: {
return (
<MetaRow.Placeholder
key={index}