" new change"

component_ui
sonali 2024-10-03 17:36:03 +05:30
parent 56edbb76b5
commit 33d5b93a9c
2 changed files with 10 additions and 4 deletions

View File

@ -45,9 +45,11 @@ function ExpenseRecords() {
}, [entry, lastEntry]); }, [entry, lastEntry]);
const handleBackClick = () => { const handleBackClick = () => {
navigate("/"); navigate("/expense-totalsuccessfully");
}; };
const handleBackHomeClick = () => {
navigate("/")
}
const handleEditClick = () => { const handleEditClick = () => {
const idToEdit = entryId || (lastEntry ? lastEntry.id : null); const idToEdit = entryId || (lastEntry ? lastEntry.id : null);
@ -94,7 +96,7 @@ function ExpenseRecords() {
</div> </div>
<div className="success-buttons"> <div className="success-buttons">
<div className="btn-home" onClick={handleBackClick}>Home</div> <div className="btn-home" onClick={handleBackHomeClick}>Home</div>
<div className="btn-edit" onClick={handleEditClick}>Edit</div> <div className="btn-edit" onClick={handleEditClick}>Edit</div>
</div> </div>
</div> </div>

View File

@ -48,6 +48,10 @@ function Records() {
navigate("/totalsuccessfully"); navigate("/totalsuccessfully");
}; };
const handleBackHomeClick = () => {
navigate("/")
}
const handleEditClick = () => { const handleEditClick = () => {
const idToEdit = entryId || (lastEntry ? lastEntry.id : null); const idToEdit = entryId || (lastEntry ? lastEntry.id : null);
@ -96,7 +100,7 @@ function Records() {
</div> </div>
<div className="success-buttons"> <div className="success-buttons">
<div className="btn-home" onClick={handleBackClick}>Home</div> <div className="btn-home" onClick={handleBackHomeClick}>Home</div>
<div className="btn-edit" onClick={handleEditClick}>Edit</div> <div className="btn-edit" onClick={handleEditClick}>Edit</div>
</div> </div>
</div> </div>