File tree Expand file tree Collapse file tree
save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,15 +40,17 @@ val indexViewInfo: FC<UserInfoAwareProps> = FC { props ->
4040 val (notificationForDeletion, setNotificationForDeletion) = useState<NotificationDto ?>(null )
4141
4242 useRequest {
43- val newNotifications = get(
44- url = " $apiUrl /notifications/get-all-by-user" ,
45- headers = jsonHeaders,
46- loadingHandler = ::noopLoadingHandler,
47- ).unsafeMap {
48- it.decodeFromJsonString<List <NotificationDto >>()
49- }
43+ props.userInfo?.let {
44+ val newNotifications = get(
45+ url = " $apiUrl /notifications/get-all-by-user" ,
46+ headers = jsonHeaders,
47+ loadingHandler = ::noopLoadingHandler,
48+ ).unsafeMap {
49+ it.decodeFromJsonString<List <NotificationDto >>()
50+ }
5051
51- setNotifications(newNotifications)
52+ setNotifications(newNotifications)
53+ }
5254 }
5355
5456 useRequest(arrayOf(notificationForDeletion)) {
You can’t perform that action at this time.
0 commit comments