mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-21 03:22:11 +00:00
Err content returned as string from core
This commit is contained in:
parent
2f0aeb1f38
commit
e4e4784dc3
2 changed files with 2 additions and 20 deletions
|
|
@ -40,21 +40,12 @@ const Board = () => {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
case 'Err': {
|
case 'Err': {
|
||||||
const type = `Error(${catalog.content.content.type})`;
|
|
||||||
const description = catalog.content.content.type === 'UnexpectedResponse' ?
|
|
||||||
catalog.content.content.content
|
|
||||||
:
|
|
||||||
catalog.content.content.type === 'Env' ?
|
|
||||||
catalog.content.content.content.message
|
|
||||||
:
|
|
||||||
null;
|
|
||||||
const message = `${type}${description !== null ? ` ${description}` : null}`;
|
|
||||||
return (
|
return (
|
||||||
<MetaRow
|
<MetaRow
|
||||||
key={index}
|
key={index}
|
||||||
className={styles['board-row']}
|
className={styles['board-row']}
|
||||||
title={catalog.title}
|
title={catalog.title}
|
||||||
message={message}
|
message={catalog.content.content}
|
||||||
deepLinks={catalog.deepLinks}
|
deepLinks={catalog.deepLinks}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -63,21 +63,12 @@ const Search = ({ queryParams }) => {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
case 'Err': {
|
case 'Err': {
|
||||||
const type = `Error(${catalog.content.content.type})`;
|
|
||||||
const description = catalog.content.content.type === 'UnexpectedResponse' ?
|
|
||||||
catalog.content.content.content
|
|
||||||
:
|
|
||||||
catalog.content.content.type === 'Env' ?
|
|
||||||
catalog.content.content.content.message
|
|
||||||
:
|
|
||||||
'';
|
|
||||||
const message = `${type}${description !== null ? ` ${description}` : null}`;
|
|
||||||
return (
|
return (
|
||||||
<MetaRow
|
<MetaRow
|
||||||
key={index}
|
key={index}
|
||||||
className={styles['search-row']}
|
className={styles['search-row']}
|
||||||
title={catalog.title}
|
title={catalog.title}
|
||||||
message={message}
|
message={catalog.content.content}
|
||||||
deepLinks={catalog.deepLinks}
|
deepLinks={catalog.deepLinks}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue