Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
component: ({ select }, { decorateAction }) => {
const id = "198c4b2f-ecec-4f34-be53-c89f83bc1b44";
const scale = selectScales(select);
const section = selectSection(select);
return mockArticle({
decorateAction,
id,
params: makeParams({
error: () => new Error("Article error"),
variables: () => ({
id
})
}),
scale,
section
});
},
name: "Magazine Comment - Error",
component: ({ select }, { decorateAction }) => {
const id = "198c4b2f-ecec-4f34-be53-c89f83bc1b44";
const scale = selectScales(select);
const section = selectSection(select);
return mockArticle({
decorateAction,
id,
params: makeParams({
error: () => new Error("Article error"),
variables: () => ({
id
})
}),
scale,
section
});
},
name: "Main Comment - Error",
component: ({ select }, { decorateAction }) => {
const id = "198c4b2f-ecec-4f34-be53-c89f83bc1b44";
const scale = selectScales(select);
const sectionColour = selectSection(select);
return mockArticle({
decorateAction,
id,
params: makeParams({
error: () => new Error("Article error"),
variables: () => ({
id
})
}),
scale,
sectionColour
});
},
name: "Error",
component: ({ select }, { decorateAction }) => {
const id = "198c4b2f-ecec-4f34-be53-c89f83bc1b44";
const scale = selectScales(select);
const section = selectSection(select);
return mockArticle({
decorateAction,
id,
params: makeParams({
error: () => new Error("Article error"),
variables: () => ({
id
})
}),
scale,
section
});
},
name: "Magazine Standard - Error",
component: ({ select }, { decorateAction }) => {
const id = "198c4b2f-ecec-4f34-be53-c89f83bc1b44";
const scale = selectScales(select);
const section = selectSection(select);
return mockArticle({
decorateAction,
id,
params: makeParams({
error: () => new Error("Article error"),
variables: () => ({
id
})
}),
scale,
section
});
},
name: "In Depth - Error",
componentDidMount() {
const { configuration, id } = this.props;
schemaToMocks(
makeParams({
makeArticle: makeArticle(configuration),
variables: () => ({
id
})
})
).then(mocks => this.setState({ mocks }));
}
() =>
schemaToMocks(
makeParams({
makeArticle: makeArticle(configuration),
variables: () => ({
id
})
})
).then(mocks => this.setState({ mocks, reRendering: false }))
);