From eeba4a71ee41491e06d2b2ede290177db0f926ff Mon Sep 17 00:00:00 2001 From: tdanielles Date: Wed, 31 Jul 2024 13:56:08 -0700 Subject: [PATCH] await handleSave and added padding --- pages/hackerapps/[id]/basicinfo.js | 4 ++-- pages/hackerapps/[id]/skills.js | 4 ++-- pages/hackerapps/[id]/welcome.js | 4 ++-- utility/firebase.js | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pages/hackerapps/[id]/basicinfo.js b/pages/hackerapps/[id]/basicinfo.js index 7e06864f..03d801d0 100644 --- a/pages/hackerapps/[id]/basicinfo.js +++ b/pages/hackerapps/[id]/basicinfo.js @@ -150,8 +150,8 @@ export default ({ id, hackathons }) => { color={COLOR.MIDNIGHT_PURPLE_DEEP} contentColor={COLOR.WHITE} hoverBackgroundColor={COLOR.MIDNIGHT_PURPLE_LIGHT} - onClick={() => { - handleSave(id) + onClick={async () => { + await handleSave(id) }} > diff --git a/pages/hackerapps/[id]/skills.js b/pages/hackerapps/[id]/skills.js index f9ca622b..832c9e9a 100644 --- a/pages/hackerapps/[id]/skills.js +++ b/pages/hackerapps/[id]/skills.js @@ -150,8 +150,8 @@ export default ({ id, hackathons }) => { color={COLOR.MIDNIGHT_PURPLE_DEEP} contentColor={COLOR.WHITE} hoverBackgroundColor={COLOR.MIDNIGHT_PURPLE_LIGHT} - onClick={() => { - handleSave(id) + onClick={async () => { + await handleSave(id) }} > diff --git a/pages/hackerapps/[id]/welcome.js b/pages/hackerapps/[id]/welcome.js index ca6de95a..fb42fb5a 100644 --- a/pages/hackerapps/[id]/welcome.js +++ b/pages/hackerapps/[id]/welcome.js @@ -126,8 +126,8 @@ export default ({ id, hackathons }) => { color={COLOR.MIDNIGHT_PURPLE_DEEP} contentColor={COLOR.WHITE} hoverBackgroundColor={COLOR.MIDNIGHT_PURPLE_LIGHT} - onClick={() => { - handleSave(id) + onClick={async () => { + await handleSave(id) }} > diff --git a/utility/firebase.js b/utility/firebase.js index 230cb0ee..b8e9aa25 100644 --- a/utility/firebase.js +++ b/utility/firebase.js @@ -766,7 +766,7 @@ export const updateHackerAppQuestions = async (selectedHackathon, questions, cat }) questions.forEach((question, index) => { - const newDocRef = categoryRef.doc(`${index}`) + const newDocRef = categoryRef.doc(`${index.toString().padStart(3, '0')}`) batch.set(newDocRef, question) }) await batch.commit()