diff --git a/src/api/ShlinkApiClient.js b/src/api/ShlinkApiClient.js index 7630c322..494bcc89 100644 --- a/src/api/ShlinkApiClient.js +++ b/src/api/ShlinkApiClient.js @@ -26,7 +26,7 @@ export class ShlinkApiClient { */ listShortUrls = (params = {}) => { return this._performRequest('/rest/short-codes', 'GET', params) - .then(resp => resp.data.shortUrls.data) + .then(resp => resp.data.shortUrls) .catch(e => this._handleAuthError(e, this.listShortUrls, [params])); }; diff --git a/src/short-urls/ShortUrls.js b/src/short-urls/ShortUrls.js index fe892434..f6e16523 100644 --- a/src/short-urls/ShortUrls.js +++ b/src/short-urls/ShortUrls.js @@ -1,13 +1,19 @@ import React from 'react'; +import { connect } from 'react-redux'; import SearchBar from './SearchBar'; -import ShortUrlsList from './ShortUrlsList'; import './ShortUrls.scss'; +import ShortUrlsList from './ShortUrlsList'; -export default function ShortUrls(props) { +export function ShortUrls(props) { return (