Skip to content

Commit

Permalink
FAIR SHARE 1.2.1
Browse files Browse the repository at this point in the history
Delete Sweet Alert 2
Update README.md
  • Loading branch information
DavidGomezToca committed Sep 18, 2024
1 parent 8610f1e commit 5985121
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 34 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@

- **STACK :**

- **Fair Share** : `1.2.0`
- **Fair Share** : `1.2.1`
- **React** : `18.3.1`
- **React Dom** : `18.3.1`
- **SweetAlert2** : `11.12.4`

---

Expand Down
14 changes: 2 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fair-share",
"version": "1.2.0",
"version": "1.2.1",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.17.0",
Expand All @@ -9,7 +9,6 @@
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-scripts": "5.0.1",
"sweetalert2": "^11.12.4",
"web-vitals": "^2.1.4"
},
"scripts": {
Expand Down
21 changes: 3 additions & 18 deletions src/components/App.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import Swal from "sweetalert2";
import { useState } from "react";
import FriendsData from "../data/friendsData.json";

Expand Down Expand Up @@ -137,25 +136,11 @@ function FormSplitBill({ selectedFriend, onSplitBill }) {
};

if ((bill === paidByUser && whoIsPaying === "user") || (bill === paidByFriend && whoIsPaying === "friend")) {
let title = "Splitting this bill won't affect your current balance with " + selectedFriend.name;
Swal.fire({
title: title, icon: "question",
customClass: {
htmlContainer: "swal2-text",
confirmButton: "swal2-text",
popup: "swal2-popup"
}
});
// let title = "Splitting this bill won't affect your current balance with " + selectedFriend.name;
// TODO: Add Notification this bill won't affect your current balance
} else {
onSplitBill(whoIsPaying === "user" ? paidByFriend : -paidByUser);
Swal.fire({
title: "Bill split succesfully", icon: "success",
customClass: {
htmlContainer: "swal2-text",
confirmButton: "swal2-text",
popup: "swal2-popup"
}
});
// TODO: Add Notification bill split successfully
}
}

Expand Down

0 comments on commit 5985121

Please sign in to comment.