Skip to content

Commit 7e6e236

Browse files
committed
(feat:JS) move menuIcon variable to query_selector folder
1 parent 335bc1f commit 7e6e236

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

public/index.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ import {
4848
previousPage,
4949
sendToUserInbox,
5050
wrapper,
51-
non_picture_section
51+
non_picture_section,
52+
menuIcon
5253
} from "./js_utilities/query_selector.js";
5354

5455
let currentCameraIndex = 0;
@@ -158,8 +159,6 @@ recipeButtons.forEach((button) => {
158159
console.log(userText.value);
159160
button.addEventListener("click", async () => {
160161
displayElements([loadingContainer]);
161-
// removeElements([headline, allergies, ...recipeButtons]);
162-
// removeElements([non_picture_section]);
163162
removeElements([mainElement])
164163

165164
const userRecipe = createUserRecipe(button, dietaryRequirements, userText);
@@ -177,7 +176,6 @@ recipeButtons.forEach((button) => {
177176
eventSource.close();
178177
return;
179178
}
180-
// removeElements([headline, allergies, ...recipeButtons]);
181179
displayElements([gptResponseElement]);
182180
gptResponseElement.textContent += eventData.message;
183181
return;
@@ -347,7 +345,7 @@ takePicture.addEventListener("click", () => {
347345
});
348346

349347
// Menu icon toggle
350-
const menuIcon = document.querySelector(".menu-icon");
348+
351349

352350
menuIcon.addEventListener("click", () => {
353351
wrapper.classList.toggle("change");

public/js_utilities/query_selector.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ const otherDietaryRequirements = document.querySelector(
3939
"#other-dietary-requirements"
4040
);
4141
const non_picture_section = document.querySelector(".non-picture-section")
42+
const menuIcon = document.querySelector(".menu-icon");
4243
const userText = document.querySelector("#user-text");
4344
const constraint = {
4445
audio: false,
@@ -89,7 +90,8 @@ export {
8990
sendToUserInbox,
9091
emailUserRecipeSection,
9192
wrapper,
92-
non_picture_section
93+
non_picture_section,
94+
menuIcon
9395
};
9496

9597

0 commit comments

Comments
 (0)