fix feedback

This commit is contained in:
taskylizard 2023-11-03 10:35:44 +05:30
parent 55a15678c6
commit c81932d383
No known key found for this signature in database
GPG key ID: 5CABA3D642DDC497
2 changed files with 6 additions and 8 deletions

View file

@ -4,7 +4,6 @@ import { reactive, ref } from "vue";
interface Feedback {
message: string;
feedbackType?: string;
anonymous?: boolean;
contactEmail?: string;
}
@ -12,7 +11,7 @@ const loading = ref(false);
const error = ref<unknown>(null);
const success = ref(false);
const feedback = reactive<Feedback>({ message: "" });
const feedback = reactive<Feedback>({ message: "", contactEmail: "" });
const feedbackOptions = [
{ label: "🐞 Bug", value: "bug" },
@ -33,12 +32,12 @@ function getFeedbackOption(value: string) {
async function handleSubmit(type?: string) {
if (type) feedback.feedbackType = type as string;
loading.value = true;
const body: Feedback = {
message: feedback.message,
feedbackType: feedback.feedbackType,
contactEmail: feedback.contactEmail,
anonymous: feedback.anonymous,
};
try {
@ -175,7 +174,6 @@ async function handleSubmit(type?: string) {
color: var(--vp-c-text-2);
}
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.25s ease;