@@ -13,7 +13,6 @@ import ErrorPage from '../ErrorPage';
1313import LoadingIndicator from '../../components/LoadingIndicator' ;
1414import { useAuth } from '../../hooks/auth.hooks' ;
1515import { Button } from '@mui/material' ;
16- import { useToast } from '../../hooks/toasts.hooks' ;
1716
1817interface ProposedSolutionsListProps {
1918 proposedSolutions : ProposedSolution [ ] ;
@@ -25,7 +24,6 @@ const ProposedSolutionsList: React.FC<ProposedSolutionsListProps> = ({ proposedS
2524 const [ showEditableForm , setShowEditableForm ] = useState < boolean > ( false ) ;
2625 const auth = useAuth ( ) ;
2726 const { isLoading, isError, error, mutateAsync } = useCreateProposeSolution ( ) ;
28- const toast = useToast ( ) ;
2927
3028 if ( isLoading || ! auth . user ) return < LoadingIndicator /> ;
3129 if ( isError ) return < ErrorPage message = { error ?. message } /> ;
@@ -35,22 +33,15 @@ const ProposedSolutionsList: React.FC<ProposedSolutionsListProps> = ({ proposedS
3533 const addProposedSolution = async ( data : ProposedSolution ) => {
3634 setShowEditableForm ( false ) ;
3735 const { description, timelineImpact, scopeImpact, budgetImpact } = data ;
38-
39- try {
40- // send the details of new proposed solution to the backend database
41- await mutateAsync ( {
42- submitterId : userId ,
43- crId,
44- description,
45- scopeImpact,
46- timelineImpact,
47- budgetImpact
48- } ) ;
49- } catch ( e ) {
50- if ( e instanceof Error ) {
51- toast . error ( e . message ) ;
52- }
53- }
36+ // send the details of new proposed solution to the backend database
37+ await mutateAsync ( {
38+ submitterId : userId ,
39+ crId,
40+ description,
41+ scopeImpact,
42+ timelineImpact,
43+ budgetImpact
44+ } ) ;
5445 } ;
5546
5647 return (
0 commit comments