mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
## Summary Correct spelling errors in the cms-agilitycms example, including the image prop spelling and dependency imports. Bug Fixes: - Fix misspelled intersectionTreshold prop to intersectionThreshold in the Image component and its useInView configuration Enhancements: - Rename dependancies.ts to dependencies.ts and update requireComponentDependancyByName to requireComponentDependencyByName across API and component imports ### Adding or Updating Examples - [x] The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - [x] Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md Co-authored-by: Joseph <[email protected]>
19 lines
431 B
TypeScript
19 lines
431 B
TypeScript
import { requireComponentDependencyByName } from "../dependencies";
|
|
|
|
export default function ContentZone(props) {
|
|
function RenderModules() {
|
|
let modules = props.page.zones[props.name];
|
|
|
|
return modules.map((m, i) => {
|
|
const AgilityModule = requireComponentDependencyByName(m.moduleName);
|
|
return <AgilityModule key={i} {...m.item} />;
|
|
});
|
|
}
|
|
|
|
return (
|
|
<div>
|
|
<RenderModules />
|
|
</div>
|
|
);
|
|
}
|