Last active
October 29, 2021 18:15
-
-
Save SidneyAllen/ec7916f2120f5f7be2d9eb13e3c55f0a 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
// src/components/Front.vue | |
<script setup> | |
import router from "../router"; | |
... | |
const templateName = ref("") | |
async function submitTemplate() { | |
await fetch(`http://localhost:3030/templates/create?logoText=${logoText.value}&templateName=${templateName.value}&backgroundImage=${imgSrc.value}&description=${headerText.value}`, { method: "POST" }) | |
router.push("/list") | |
} | |
</script> | |
<template> | |
... | |
<div> | |
<h2>Finished with your postcard design?</h2> | |
<div class="form-field"> | |
<label for="templateName">Give it a name</label> | |
<input id="templateName" v-model="templateName" /> | |
</div> | |
<button @click="submitTemplate()">Upload template</button> | |
</div> | |
</template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment