mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-04 11:41:09 +00:00
board adapted to stremio-core changes
This commit is contained in:
parent
609772a932
commit
eb9bbeab0b
2 changed files with 9 additions and 9 deletions
|
|
@ -20,32 +20,32 @@ const Board = () => {
|
|||
<div className={styles['board-container']}>
|
||||
<MainNavBar className={styles['nav-bar']} />
|
||||
<div className={styles['board-content']}>
|
||||
{catalogs.map(({ req, content }, index) => {
|
||||
{catalogs.map(({ request, content }, index) => {
|
||||
switch (content.type) {
|
||||
case 'Ready':
|
||||
return (
|
||||
<MetaRow
|
||||
key={`${index}${req.base}${content.type}`}
|
||||
key={`${index}${request.base}${content.type}`}
|
||||
className={styles['board-row']}
|
||||
title={`${req.path.id} - ${req.path.type_name}`}
|
||||
title={`${request.path.id} - ${request.path.type_name}`}
|
||||
items={content.content}
|
||||
/>
|
||||
);
|
||||
case 'Message':
|
||||
return (
|
||||
<MetaRow
|
||||
key={`${index}${req.base}${content.type}`}
|
||||
key={`${index}${request.base}${content.type}`}
|
||||
className={styles['board-row']}
|
||||
title={`${req.path.id} - ${req.path.type_name}`}
|
||||
title={`${request.path.id} - ${request.path.type_name}`}
|
||||
message={content.content}
|
||||
/>
|
||||
);
|
||||
case 'Loading':
|
||||
return (
|
||||
<MetaRow.Placeholder
|
||||
key={`${index}${req.base}${content.type}`}
|
||||
key={`${index}${request.base}${content.type}`}
|
||||
className={styles['board-row-placeholder']}
|
||||
title={`${req.path.id} - ${req.path.type_name}`}
|
||||
title={`${request.path.id} - ${request.path.type_name}`}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,13 +7,13 @@ const useCatalogs = () => {
|
|||
React.useEffect(() => {
|
||||
const onNewState = () => {
|
||||
const state = core.getState();
|
||||
setCatalogs(state.board.groups);
|
||||
setCatalogs(state.board.items_groups);
|
||||
};
|
||||
core.on('NewModel', onNewState);
|
||||
core.dispatch({
|
||||
action: 'Load',
|
||||
args: {
|
||||
load: 'CatalogGrouped',
|
||||
load: 'CatalogsGrouped',
|
||||
args: { extra: [] }
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue