npx @redwoodjs/codemods@latest update-cell-mocks

This commit is contained in:
David Corbitt
2022-01-18 17:54:36 -07:00
parent f4b9265e8d
commit c7bf1ef043
2 changed files with 28 additions and 24 deletions

View File

@@ -1,9 +1,11 @@
// Define your own mock data here: // Define your own mock data here:
export const standard = (/* vars, { ctx, req } */) => ({ export const standard = () => {
return {
post: { post: {
id: 1, id: 1,
title: 'First Post', title: 'First Post',
body: `Neutra tacos hot chicken prism raw denim, put a bird on it enamel pin post-ironic vape cred DIY. Street art next level umami squid. Hammock hexagon glossier 8-bit banjo. Neutra la croix mixtape echo park four loko semiotics kitsch forage chambray. Semiotics salvia selfies jianbing hella shaman. Letterpress helvetica vaporware cronut, shaman butcher YOLO poke fixie hoodie gentrify woke heirloom.`, body: `Neutra tacos hot chicken prism raw denim, put a bird on it enamel pin post-ironic vape cred DIY. Street art next level umami squid. Hammock hexagon glossier 8-bit banjo. Neutra la croix mixtape echo park four loko semiotics kitsch forage chambray. Semiotics salvia selfies jianbing hella shaman. Letterpress helvetica vaporware cronut, shaman butcher YOLO poke fixie hoodie gentrify woke heirloom.`,
createdAt: '2020-01-01T12:34:56Z', createdAt: '2020-01-01T12:34:56Z',
}, },
}) };
};

View File

@@ -1,5 +1,6 @@
// Define your own mock data here: // Define your own mock data here:
export const standard = (/* vars, { ctx, req } */) => ({ export const standard = () => {
return {
posts: [ posts: [
{ {
id: 1, id: 1,
@@ -14,4 +15,5 @@ export const standard = (/* vars, { ctx, req } */) => ({
createdAt: '2020-01-01T12:34:56Z', createdAt: '2020-01-01T12:34:56Z',
}, },
], ],
}) };
};