Created
November 7, 2019 19:21
-
-
Save usulpro/f09114e6005333e0125696c64136ad12 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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