Updated mercure integration so that the hook accepts a list of topics to subscribe

This commit is contained in:
Alejandro Celaya
2021-02-28 10:12:30 +01:00
parent 71ee886e24
commit 9904ac757b
10 changed files with 41 additions and 21 deletions

View File

@@ -9,6 +9,7 @@ import { determineOrderDir, OrderDir } from '../utils/utils';
import { isReachableServer, SelectedServer } from '../servers/data';
import { boundToMercureHub } from '../mercure/helpers/boundToMercureHub';
import { parseQuery } from '../utils/helpers/query';
import { Topics } from '../mercure/helpers/Topics';
import { ShortUrlsList as ShortUrlsListState } from './reducers/shortUrlsList';
import { OrderableFields, ShortUrlsListParams, SORTABLE_FIELDS } from './reducers/shortUrlsListParams';
import { ShortUrlsTableProps } from './ShortUrlsTable';
@@ -98,6 +99,6 @@ const ShortUrlsList = (ShortUrlsTable: FC<ShortUrlsTableProps>) => boundToMercur
</Card>
</>
);
}, () => 'https://shlink.io/new-visit');
}, () => [ Topics.visits() ]);
export default ShortUrlsList;