Skip to content

Commit 5277c04

Browse files
fix: added pagination and mercure files in NextGenerator (#299)
1 parent 0b83722 commit 5277c04

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/generators/NextGenerator.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export default class NextGenerator extends BaseGenerator {
88
this.routeAddedtoServer = false;
99
this.registerTemplates(`next/`, [
1010
// components
11+
"components/common/Pagination.tsx",
1112
"components/common/ReferenceLinks.tsx",
1213
"components/foo/List.tsx",
1314
"components/foo/Show.tsx",
@@ -25,6 +26,7 @@ export default class NextGenerator extends BaseGenerator {
2526

2627
// utils
2728
"utils/dataAccess.ts",
29+
"utils/mercure.ts",
2830
]);
2931
}
3032

@@ -87,13 +89,15 @@ export default class NextGenerator extends BaseGenerator {
8789
// copy with regular name
8890
[
8991
// components
92+
"components/common/Pagination.tsx",
9093
"components/common/ReferenceLinks.tsx",
9194

9295
// types
9396
"types/Collection.ts",
9497

9598
// utils
9699
"utils/dataAccess.ts",
100+
"utils/mercure.ts",
97101
].forEach((file) =>
98102
this.createFile(file, `${dir}/${file}`, context, false)
99103
);

templates/next/pages/foos/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const Page: NextComponentType<NextPageContext, Props, Props> = (props) => {
2929
}
3030

3131
export const getServerSideProps: GetServerSideProps = async () => {
32-
const collection = await fetch('/{{{name}}}');
32+
const response = await fetch('/{{{name}}}');
3333

3434
return {
3535
props: {

0 commit comments

Comments
 (0)