Created
November 19, 2021 04:02
-
-
Save ShariqT/9c433acaf7b5c6482012490b3df987f4 to your computer and use it in GitHub Desktop.
CreatePostcard.vue
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
<script setup> | |
import { ref, onMounted } from "vue"; | |
import AddressForm from "./AddressForm.vue"; | |
const toAddress = ref({ name: "", address_line1: "", address_line1: "", address_city: "", address_state: "", address_zip: "" }) | |
const fromAddress = ref({ name: "", address_line1: "", address_line1: "", address_city: "", address_state: "", address_zip: "" }) | |
const templates = ref([]); | |
const frontTemplate = ref("") | |
const backTemplate = ref("") | |
const error = ref("") | |
const success = ref(false) | |
const loading = ref(false) | |
const frontThumbnail = ref("") | |
const backThumbnail = ref("") | |
onMounted(() => { | |
fetch("http://localhost:3030/templates") | |
.then((data) => data.json()) | |
.then((data) => templates.value = data); | |
}) | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment