chore: cleanup warnings (#3469)
This commit is contained in:
parent
df33bc64a9
commit
ce69fdd66b
@ -164,6 +164,7 @@ export default class GitGatewayAuthenticationPage extends React.Component {
|
||||
return (
|
||||
<AuthenticationPage
|
||||
logoUrl={config.logo_url}
|
||||
siteUrl={config.site_url}
|
||||
onLogin={this.handleIdentity}
|
||||
renderPageContent={() => (
|
||||
<a
|
||||
@ -174,14 +175,17 @@ export default class GitGatewayAuthenticationPage extends React.Component {
|
||||
{errors.identity}
|
||||
</a>
|
||||
)}
|
||||
t={t}
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<AuthenticationPage
|
||||
logoUrl={config.logo_url}
|
||||
siteUrl={config.site_url}
|
||||
onLogin={this.handleIdentity}
|
||||
renderButtonContent={() => t('auth.loginWithNetlifyIdentity')}
|
||||
t={t}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
@ -98,6 +98,7 @@ describe('editorialWorkflow actions', () => {
|
||||
const backend = {
|
||||
publishUnpublishedEntry: jest.fn().mockResolvedValue(),
|
||||
getEntry: jest.fn().mockResolvedValue(entry),
|
||||
getMedia: jest.fn().mockResolvedValue([]),
|
||||
};
|
||||
|
||||
const store = mockStore({
|
||||
@ -117,7 +118,7 @@ describe('editorialWorkflow actions', () => {
|
||||
|
||||
return store.dispatch(actions.publishUnpublishedEntry('posts', slug)).then(() => {
|
||||
const actions = store.getActions();
|
||||
expect(actions).toHaveLength(7);
|
||||
expect(actions).toHaveLength(8);
|
||||
|
||||
expect(actions[0]).toEqual({
|
||||
type: 'UNPUBLISHED_ENTRY_PUBLISH_REQUEST',
|
||||
@ -147,21 +148,28 @@ describe('editorialWorkflow actions', () => {
|
||||
},
|
||||
optimist: { type: COMMIT, id: '000000000000000000000' },
|
||||
});
|
||||
|
||||
expect(actions[4]).toEqual({
|
||||
type: 'MEDIA_LOAD_SUCCESS',
|
||||
payload: {
|
||||
files: [],
|
||||
},
|
||||
});
|
||||
expect(actions[5]).toEqual({
|
||||
type: 'ENTRY_REQUEST',
|
||||
payload: {
|
||||
slug,
|
||||
collection: 'posts',
|
||||
},
|
||||
});
|
||||
expect(actions[5]).toEqual({
|
||||
expect(actions[6]).toEqual({
|
||||
type: 'ENTRY_SUCCESS',
|
||||
payload: {
|
||||
entry,
|
||||
collection: 'posts',
|
||||
},
|
||||
});
|
||||
expect(actions[6]).toEqual({
|
||||
expect(actions[7]).toEqual({
|
||||
type: 'DRAFT_CREATE_FROM_ENTRY',
|
||||
payload: {
|
||||
entry,
|
||||
|
@ -183,7 +183,7 @@ export class PreviewPane extends React.Component {
|
||||
};
|
||||
|
||||
render() {
|
||||
const { entry, collection } = this.props;
|
||||
const { entry, collection, config } = this.props;
|
||||
|
||||
if (!entry || !entry.get('data')) {
|
||||
return null;
|
||||
@ -220,7 +220,7 @@ export class PreviewPane extends React.Component {
|
||||
`;
|
||||
|
||||
return (
|
||||
<ErrorBoundary>
|
||||
<ErrorBoundary config={config}>
|
||||
<PreviewPaneFrame head={styleEls} initialContent={initialContent}>
|
||||
<EditorPreviewContent {...{ previewComponent, previewProps }} />
|
||||
</PreviewPaneFrame>
|
||||
@ -239,7 +239,7 @@ PreviewPane.propTypes = {
|
||||
|
||||
const mapStateToProps = state => {
|
||||
const isLoadingAsset = selectIsLoadingAsset(state.medias);
|
||||
return { isLoadingAsset };
|
||||
return { isLoadingAsset, config: state.config };
|
||||
};
|
||||
|
||||
const mapDispatchToProps = dispatch => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user