Last active
November 19, 2021 05:52
-
-
Save ShariqT/516a2b1db0f6c0f7e8a115fb4717fbbb to your computer and use it in GitHub Desktop.
CreatePostcard
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
onMounted(() => { | |
fetch("http://localhost:3030/templates") | |
.then((data) => data.json()) | |
.then((data) => templates.value = data); | |
const script = document.createElement("script"); | |
script.src = "https://cdn.lob.com/lob-address-elements/2.1.3/lob-address-elements.min.js"; | |
script.async = true; | |
script.setAttribute("data-lob-key", import.meta.env.VITE_LOB_API_KEY); | |
script.setAttribute("data-lob-primary-id", "firstLine"); | |
script.setAttribute("data-lob-secondary-id", "secondLine"); | |
script.setAttribute("data-lob-city-id", "city"); | |
script.setAttribute("data-lob-state-id", "state"); | |
script.setAttribute("data-lob-zip-id", "zip"); | |
document.body.appendChild(script); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment