File tree Expand file tree Collapse file tree 3 files changed +3
-8
lines changed Expand file tree Collapse file tree 3 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -37,15 +37,12 @@ const useGetNotificationsByTeamId = (updateTrigger) => {
37
37
const [ notifications , setNotifications ] = useState ( [ ] ) ;
38
38
const [ isLoading , setIsLoading ] = useState ( false ) ;
39
39
const [ error , setError ] = useState ( null ) ;
40
- const { user } = useSelector ( ( state ) => state . auth ) ;
41
40
const { t } = useTranslation ( ) ;
42
41
43
42
const getNotifications = useCallback ( async ( ) => {
44
43
try {
45
44
setIsLoading ( true ) ;
46
- const response = await networkService . getNotificationsByTeamId ( {
47
- teamId : user . teamId ,
48
- } ) ;
45
+ const response = await networkService . getNotificationsByTeamId ( ) ;
49
46
setNotifications ( response ?. data ?. data ?? [ ] ) ;
50
47
} catch ( error ) {
51
48
setError ( error ) ;
@@ -55,7 +52,7 @@ const useGetNotificationsByTeamId = (updateTrigger) => {
55
52
} finally {
56
53
setIsLoading ( false ) ;
57
54
}
58
- } , [ user . teamId ] ) ;
55
+ } , [ t ] ) ;
59
56
60
57
useEffect ( ( ) => {
61
58
getNotifications ( ) ;
Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ import {
17
17
useDeleteNotification ,
18
18
} from "../../Hooks/useNotifications" ;
19
19
import { useTranslation } from "react-i18next" ;
20
- import { useParams } from "react-router-dom" ;
21
20
22
21
const Notifications = ( ) => {
23
22
const navigate = useNavigate ( ) ;
Original file line number Diff line number Diff line change @@ -996,8 +996,7 @@ class NetworkService {
996
996
}
997
997
998
998
async getNotificationsByTeamId ( config ) {
999
- const { teamId } = config ;
1000
- return this . axiosInstance . get ( `/notifications/team/${ teamId } ` ) ;
999
+ return this . axiosInstance . get ( `/notifications/team` ) ;
1001
1000
}
1002
1001
1003
1002
async deleteNotificationById ( config ) {
You can’t perform that action at this time.
0 commit comments