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