Skip to content

Commit d2ec192

Browse files
committed
closing the diaglog when data added
1 parent 8770395 commit d2ec192

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

client/src/components/StatsGenerator.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,15 @@ export default function StatsGenerator({ setShowStats }) {
129129
if (!docSnapshot.exists()) {
130130
// Add the data only if it doesn't exist
131131
await setDoc(docRef, transformedUserData);
132-
console.log("User data added to Firestore successfully!");
132+
// console.log("User data added to Firestore successfully!");
133133
dataAdded()
134+
setShowStats(false)
134135
} else {
135136
console.log("User data already exists in Firestore.");
136137
dataThere()
137138
}
139+
140+
138141
}
139142
catch (err) {
140143
console.log(err);

0 commit comments

Comments
 (0)