- updated zustand and react libraries;
- added 'put in draft' btn;
This commit is contained in:
@@ -5,7 +5,7 @@ import SockJS from 'sockjs-client';
|
||||
import { Stomp } from '@stomp/stompjs';
|
||||
|
||||
// store
|
||||
import { storeGet, useStore } from '../../store';
|
||||
import { storeGet, useStoreValue } from '../../store';
|
||||
|
||||
// api
|
||||
import NotificationService from '../../service/notification-service';
|
||||
@@ -24,8 +24,8 @@ import PaginatorBasic from '../PaginatorBasic';
|
||||
const socketUrl = process.env.REACT_APP_API_ADDRESS_WS;
|
||||
|
||||
const NotificationsSidebar = () => {
|
||||
const chosenCompanyId = useStore().main.chosenCompanyId();
|
||||
const userData = useStore().main.userData();
|
||||
const chosenCompanyId = useStoreValue('chosenCompanyId');
|
||||
const userData = useStoreValue('userData');
|
||||
const [activeIndex, setActiveIndex] = useState(0);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [notificationsVisible, setNotificationsVisible] = useState(false);
|
||||
@@ -82,8 +82,8 @@ const NotificationsSidebar = () => {
|
||||
}
|
||||
|
||||
const fetchMessages = useCallback((status = 'UNREAD') => {
|
||||
const chosenCompanyId = storeGet.main.chosenCompanyId();
|
||||
const userData = storeGet.main.userData();
|
||||
const chosenCompanyId = storeGet('chosenCompanyId');
|
||||
const userData = storeGet('userData');
|
||||
const role = pathOr('', ['role', 'roleType'], userData);
|
||||
const bodyParams = getPaginationQuery(status, currentPage);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user