fix(integration-asset-store): fix react-waypoint import (#4848)

This commit is contained in:
Erez Rokah 2021-01-19 04:49:25 -08:00 committed by GitHub
parent 5b4e2ee99f
commit 6611cb5253
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import Waypoint from 'react-waypoint'; import { Waypoint } from 'react-waypoint';
import MediaLibraryCard from './MediaLibraryCard'; import MediaLibraryCard from './MediaLibraryCard';
import { Map } from 'immutable'; import { Map } from 'immutable';
import { colors } from 'netlify-cms-ui-default'; import { colors } from 'netlify-cms-ui-default';

View File

@ -81,7 +81,7 @@ export default class AssetStore {
}; };
const response = await this.request(url, { headers }); const response = await this.request(url, { headers });
const files = response.map(({ id, name, size, url }) => { const files = response.map(({ id, name, size, url }) => {
return { id, name, size, displayURL: url, url }; return { id, name, size, displayURL: url, url, path: url };
}); });
return files; return files;
} }
@ -136,7 +136,7 @@ export default class AssetStore {
await this.confirmRequest(id); await this.confirmRequest(id);
} }
const asset = { id, name, size, displayURL: url, url }; const asset = { id, name, size, displayURL: url, url, path: url };
return { success: true, asset }; return { success: true, asset };
} catch (error) { } catch (error) {
console.error(error); console.error(error);