Skip to content

Instantly share code, notes, and snippets.

@ShariqT
Created November 19, 2021 04:02
Show Gist options
  • Save ShariqT/9c433acaf7b5c6482012490b3df987f4 to your computer and use it in GitHub Desktop.
Save ShariqT/9c433acaf7b5c6482012490b3df987f4 to your computer and use it in GitHub Desktop.
CreatePostcard.vue
<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