MCPcopy
hub / github.com/vercel/next.js / pagesIndexCode

Function pagesIndexCode

test/development/basic/next-rs-api.test.ts:138–144  ·  view source on GitHub ↗
(text, props = {})

Source from the content-addressed store, hash-verified

136}
137
138function pagesIndexCode(text, props = {}) {
139 return `import props from "../lib/props.js";
140export default () => <div>${text}</div>;
141export function getServerSideProps() { return { props: { ...props, ...${JSON.stringify(
142 props
143 )}} } }`
144}
145
146function appPageCode(text) {
147 return `import Client from "./client.tsx";

Callers 1

Calls 1

stringifyMethod · 0.45

Tested by

no test coverage detected