- updated zustand and react libraries;
- added 'put in draft' btn;
This commit is contained in:
@@ -5,7 +5,7 @@ import { is, isEmpty, isNil } from 'ramda';
|
||||
import 'quill/dist/quill.core.css';
|
||||
|
||||
// store
|
||||
import { storeSet, useStore } from '../../store';
|
||||
import { storeSet, useStoreValue } from '../../store';
|
||||
|
||||
// tools
|
||||
import getNumberWithCurrency from '../../helpers/getNumberWithCurrency';
|
||||
@@ -25,7 +25,7 @@ import renderHtmlContent from '../../helpers/renderHtmlContent';
|
||||
const REACT_APP_HUB_ID = process.env.REACT_APP_HUB_ID;
|
||||
|
||||
const BandoView = () => {
|
||||
const isAsyncRequest = useStore().main.isAsyncRequest();
|
||||
const isAsyncRequest = useStoreValue('isAsyncRequest');
|
||||
const { id } = useParams();
|
||||
const navigate = useNavigate();
|
||||
const [data, setData] = useState({});
|
||||
@@ -40,7 +40,7 @@ const BandoView = () => {
|
||||
if (data.status === 'SUCCESS') {
|
||||
setData(getFormattedBandiData(data.data));
|
||||
}
|
||||
storeSet.main.unsetAsyncRequest();
|
||||
storeSet('unsetAsyncRequest');
|
||||
}
|
||||
|
||||
const errGetCallback = (data) => {
|
||||
@@ -54,7 +54,7 @@ const BandoView = () => {
|
||||
]);
|
||||
}
|
||||
set404FromErrorResponse(data);
|
||||
storeSet.main.unsetAsyncRequest();
|
||||
storeSet('unsetAsyncRequest');
|
||||
}
|
||||
|
||||
const getFormattedBandiData = (data) => {
|
||||
|
||||
Reference in New Issue
Block a user