- updated zustand and react libraries;
- added 'put in draft' btn;
This commit is contained in:
@@ -3,14 +3,14 @@ import { __ } from '@wordpress/i18n';
|
||||
import { intersection, is } from 'ramda';
|
||||
|
||||
// store
|
||||
import { useStore } from '../../../../store';
|
||||
import { useStoreValue } from '../../../../store';
|
||||
|
||||
// components
|
||||
import { NavLink } from 'react-router-dom';
|
||||
import HelpIcon from '../../../../icons/HelpIcon';
|
||||
|
||||
const AppSidebar = () => {
|
||||
const permissions = useStore().main.getPermissions();
|
||||
const permissions = useStoreValue('getPermissions');
|
||||
|
||||
const items = [
|
||||
{
|
||||
|
||||
@@ -7,13 +7,13 @@ import LogoIcon from '../../../../icons/LogoIcon';
|
||||
import { Button } from 'primereact/button';
|
||||
import TopBarProfileMenu from '../../../../components/TopBarProfileMenu';
|
||||
import NotificationsSidebar from '../../../../components/NotificationsSidebar';
|
||||
import { useStore } from '../../../../store';
|
||||
import { useStoreValue } from '../../../../store';
|
||||
import { head } from 'ramda';
|
||||
|
||||
const AppTopbar = () => {
|
||||
const menuLeft = useRef(null);
|
||||
const companies = useStore().main.companies();
|
||||
const chosenCompanyId = useStore().main.chosenCompanyId();
|
||||
const companies = useStoreValue('companies');
|
||||
const chosenCompanyId = useStoreValue('chosenCompanyId');
|
||||
const company = head(companies.filter(o => o.id === chosenCompanyId));
|
||||
|
||||
const startContent = <Link to="/">
|
||||
|
||||
@@ -3,18 +3,18 @@ import { __ } from '@wordpress/i18n';
|
||||
import { useLocation } from 'react-router-dom';
|
||||
|
||||
// store
|
||||
import { useStore, storeSet, storeGet } from '../../store';
|
||||
import { useStoreValue, storeSet } from '../../store';
|
||||
|
||||
// components
|
||||
import AppSidebar from './components/AppSidebar';
|
||||
import AppTopbar from './components/AppTopbar';
|
||||
|
||||
const DefaultLayout = ({ children }) => {
|
||||
const isError404 = useStore().main.isError404();
|
||||
const isError404 = useStoreValue('isError404');
|
||||
const location = useLocation();
|
||||
|
||||
useEffect(() => {
|
||||
storeSet.main.isError404(false);
|
||||
storeSet('isError404', false);
|
||||
}, [location]);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user