Skip to content

Instantly share code, notes, and snippets.

@usulpro
Created November 7, 2019 19:21
Show Gist options
  • Save usulpro/f09114e6005333e0125696c64136ad12 to your computer and use it in GitHub Desktop.
Save usulpro/f09114e6005333e0125696c64136ad12 to your computer and use it in GitHub Desktop.
// lib/renderTemplate.js
import { renderComponents } from "./renderNestedComponents";
const templateTypes = {
standard: "templateStandard",
};
const renderTemplate = ({ templateType, data }, options) => {
if (templateType === templateTypes.standard) {
return renderComponents(data.content, options);
}
return null;
};
export default renderTemplate;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment