mirror of
https://github.com/Fluffy-Bean/TastyBites.git
synced 2025-06-13 13:43:13 +00:00
Set image value in Item to list, to support more images in the future
Set all pages to Typescript
This commit is contained in:
parent
7d8d19a6e9
commit
9dce9235d6
16 changed files with 63 additions and 59 deletions
|
@ -1,4 +1,4 @@
|
|||
<script>
|
||||
<script lang="ts">
|
||||
import { PaperPlaneRight, SealWarning, SealCheck } from "phosphor-svelte";
|
||||
|
||||
import { postContactEmail } from "../lib/test-api";
|
||||
|
@ -7,7 +7,7 @@
|
|||
|
||||
const minMessageLength = 150;
|
||||
|
||||
let formMessage;
|
||||
let formMessage: Promise<string>;
|
||||
|
||||
let name = "";
|
||||
let email = "";
|
||||
|
@ -32,13 +32,13 @@
|
|||
emailValid = true;
|
||||
messageValid = false;
|
||||
|
||||
formMessage = postContactEmail(name, email, message);
|
||||
|
||||
formMessage.catch(() => {
|
||||
validateName();
|
||||
validateEmail();
|
||||
validateMessage();
|
||||
});
|
||||
formMessage = postContactEmail(name, email, message)
|
||||
.catch((error) => {
|
||||
validateName();
|
||||
validateEmail();
|
||||
validateMessage();
|
||||
return error;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue