Skip to content

Commit de495fa

Browse files
committed
refactor: removed all toast aparitions
1 parent a4e3d11 commit de495fa

File tree

4 files changed

+5
-25
lines changed

4 files changed

+5
-25
lines changed

package-lock.json

Lines changed: 0 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
"lucide-react": "^0.475.0",
2424
"react": "^18.3.1",
2525
"react-dom": "^18.3.1",
26-
"react-hot-toast": "^2.5.1",
2726
"react-icons": "^5.4.0",
2827
"react-router-dom": "^7.1.3",
2928
"react-window": "^1.8.11",

src/components/StatementBuilder.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { Input } from './ui/input';
1010
import { Button } from './ui/button';
1111
import subjects from '../../data/subjects.json';
1212
import nlp from 'compromise';
13-
import { toast } from 'react-hot-toast';
1413
import { Trash2, Edit2, Save, Eye, EyeOff } from 'lucide-react';
1514
import { ConfirmationDialog } from './ui/confirmation-dialog';
1615

@@ -174,7 +173,7 @@ const StatementBuilder: React.FC<StatementBuilderProps> = ({
174173
(statement) => statement.id !== deleteConfirmation.statementId
175174
)
176175
);
177-
toast.success('Statement deleted successfully!');
176+
console.log('Statement deleted successfully!');
178177
}
179178
setDeleteConfirmation({ isOpen: false, statementId: null });
180179
};
@@ -196,9 +195,10 @@ const StatementBuilder: React.FC<StatementBuilderProps> = ({
196195
);
197196
setEditingStatementId(null);
198197
setEditingPart(null);
199-
toast.success('Statement updated successfully!');
198+
console.log('Statement updated successfully!');
200199
} else {
201-
toast.error('This statement already exists! Changes not saved.');
200+
// XXXX WE NEED TO REVERT THE CHANGES MADE TO THE STATEMENTS ARRAY
201+
setDuplicateConfirmation({ isOpen: true, statement: null });
202202
}
203203
};
204204

src/components/StatementWizard.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { motion, AnimatePresence } from 'framer-motion';
1414
import subjects from '../../data/subjects.json';
1515
import { verbData } from '../../utils/verbUtils';
1616
// import { categorizeBySentiment } from '../../utils/verbUtils';
17-
import { toast } from 'react-hot-toast';
17+
1818
import type React from 'react';
1919
import type { PreStatement } from '../../types/types';
2020

@@ -163,7 +163,6 @@ const StatementWizard: React.FC<StatementWizardProps> = ({
163163
const handleComplete = () => {
164164
onComplete(selection);
165165
handleClose();
166-
toast.success('Statement created successfully!');
167166
};
168167

169168
const renderStep = () => {

0 commit comments

Comments
 (0)