Skip to content

Commit 7a2a945

Browse files
committed
(feat:JS): declare emailObject to solve error thrown by the console
1 parent 8b0a4b5 commit 7a2a945

5 files changed

Lines changed: 15 additions & 5 deletions

File tree

public/index.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,4 +663,13 @@ input:checked+.slider:before {
663663
width: 100%;
664664
max-width: 340px;
665665
}
666+
}
667+
668+
@keyframes fadeIn {
669+
from { opacity: 0; }
670+
to { opacity: 1; }
671+
}
672+
673+
.fade-in {
674+
animation: fadeIn 1s ease-in;
666675
}

public/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import {
1515
cacheData,
1616
CACHE_NAME_URL,
1717
CACHE_NAME_AUDIO,
18-
emailObject,
1918
audioElement,
2019
} from "./js_utilities/functions_and_variables.js";
2120

@@ -59,6 +58,7 @@ import {
5958

6059
let currentCameraIndex = 0;
6160
const switchCameraButton = document.getElementById("switchCamera");
61+
let emailObject;
6262

6363
wantToTakeAPicture.addEventListener("click", () => {
6464
removeElements([pictureSectionHeadline, wantToTakeAPicture]);
@@ -141,7 +141,7 @@ sendToUserInbox.addEventListener("click", () => {
141141
});
142142

143143
sendToUserInboxBtn.addEventListener("click", () => {
144-
console.log(`userEmail ${userEmail.value}`);
144+
// console.log(`userEmail ${userEmail.value}`);
145145
console.log(emailObject);
146146
fetch(`/email?${createQuery(emailObject)}`)
147147
.then((response) => response.json())
@@ -207,6 +207,7 @@ recipeButtons.forEach((button) => {
207207
backgroundImg.src = imageUrl;
208208
backgroundImg.onload = () => {
209209
console.log("Image loaded successfully");
210+
210211
};
211212
backgroundImg.onerror = () => {
212213
console.error("Error loading image");

public/js_utilities/functions_and_variables.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
const CACHE_NAME_URL = "image-cache-v1";
44
const CACHE_NAME_AUDIO = "audio-cache-v2";
55
let audioElement = new Audio();
6-
let emailObject;
6+
77

88

99

@@ -162,4 +162,4 @@ function createAudio(data) {
162162

163163

164164

165-
export { defaultRecipe, CACHE_NAME_URL, audioElement, emailObject, CACHE_NAME_AUDIO, cacheData, createQuery, displayElements, displayElementsFlex, displayElementsGrid, removeElements, emptyTheElement, resetCheckedStateToFalse, playAudio, pauseAudio, stopAudio, createAudio, createUserRecipe }
165+
export { defaultRecipe, CACHE_NAME_URL, audioElement, CACHE_NAME_AUDIO, cacheData, createQuery, displayElements, displayElementsFlex, displayElementsGrid, removeElements, emptyTheElement, resetCheckedStateToFalse, playAudio, pauseAudio, stopAudio, createAudio, createUserRecipe }

public/url_folder.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
https://oaidalleapiprodscus.blob.core.windows.net/private/org-nYbqgo3O0LNnYYAoKAmApBfx/user-58Je7efi0iy880e2UYCdYpBm/img-v9L2CBTafLU8oh31OEIozdM7.png?st=2024-08-01T09%3A52%3A11Z&se=2024-08-01T11%3A52%3A11Z&sp=r&sv=2023-11-03&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2024-07-31T21%3A23%3A07Z&ske=2024-08-01T21%3A23%3A07Z&sks=b&skv=2023-11-03&sig=XaG3VMFjub0IVi0JeUdbGU78fXJ%2BGcY3pnC2n%2BjiMjM%3D
1+
https://oaidalleapiprodscus.blob.core.windows.net/private/org-nYbqgo3O0LNnYYAoKAmApBfx/user-58Je7efi0iy880e2UYCdYpBm/img-fZ49pZbQpCxjm9FKRgrWUwV1.png?st=2024-08-01T13%3A04%3A59Z&se=2024-08-01T15%3A04%3A59Z&sp=r&sv=2023-11-03&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2024-07-31T23%3A34%3A47Z&ske=2024-08-01T23%3A34%3A47Z&sks=b&skv=2023-11-03&sig=jsB0y%2BY7/emg4Ic4UcC%2B3X%2BNip9uAN4c4p4cAx%2BGr%2B4%3D

speech.mp3

-730 KB
Binary file not shown.

0 commit comments

Comments
 (0)