@@ -4,7 +4,7 @@ import { useQuery, useQueryClient } from '@tanstack/react-query';
4
4
import debounce from "lodash/debounce" ;
5
5
import { useContext , useEffect , useMemo , useState } from 'react' ;
6
6
import Pagination from "react-paginate" ;
7
- import { toastr } from 'react-redux-toastr ' ;
7
+ import { toast } from 'sonner ' ;
8
8
import { useNavigate } from 'react-router-dom' ;
9
9
import Plus from 'react-feather/dist/icons/plus'
10
10
@@ -151,13 +151,11 @@ export const TeamList = () => {
151
151
. then ( team => Services . createTeam ( team ) )
152
152
. then ( r => {
153
153
if ( r . error ) {
154
- toastr . error ( translate ( 'Error' ) , r . error )
154
+ toast . error ( r . error )
155
155
} else {
156
156
queryClient . invalidateQueries ( { queryKey : [ 'teams' ] } ) ;
157
- toastr . info (
158
- translate ( "mailValidation.sent.title" ) ,
159
- translate ( "mailValidation.sent.body" ) )
160
- toastr . success ( translate ( 'Success' ) , translate ( { key : "team.created.success" , replacements : [ data . name ] } ) )
157
+ toast . info ( translate ( "mailValidation.sent.body" ) )
158
+ toast . success ( translate ( { key : "team.created.success" , replacements : [ data . name ] } ) )
161
159
}
162
160
} ) ,
163
161
value : newTeam
@@ -226,9 +224,9 @@ export const TeamList = () => {
226
224
. then ( teamToUpdate => Services . updateTeam ( teamToUpdate ) )
227
225
. then ( r => {
228
226
if ( r . error ) {
229
- toastr . error ( translate ( 'Error' ) , r . error )
227
+ toast . error ( r . error )
230
228
} else {
231
- toastr . success ( translate ( 'Success' ) , translate ( { key : "team.updated.success" , replacements : [ team . name ] } ) )
229
+ toast . success ( translate ( { key : "team.updated.success" , replacements : [ team . name ] } ) )
232
230
queryClient . invalidateQueries ( { queryKey : [ 'teams' ] } ) ;
233
231
}
234
232
} )
0 commit comments