introduce print dialog to add more options in exporting resume

This commit is contained in:
Amruth Pillai
2020-04-04 23:19:46 +05:30
parent be84d2a5e4
commit a6efc3c328
14 changed files with 327 additions and 119 deletions

View File

@ -97,7 +97,7 @@ const reducer = (state, { type, payload }) => {
return set({ ...state }, `data.${payload.key}.items`, items);
case 'delete_item':
items = get({ ...state }, `data.${payload.key}.items`, []);
remove(items, x => x === payload.value);
remove(items, (x) => x === payload.value);
return set({ ...state }, `data.${payload.key}.items`, items);
case 'move_item_up':
items = get({ ...state }, `data.${payload.key}.items`, []);

View File

@ -4,8 +4,9 @@ const PageContext = React.createContext(null);
const { Provider } = PageContext;
const StateProvider = ({ children }) => {
const [panZoomRef, setPanZoomRef] = useState(null);
const [pageRef, setPageRef] = useState(null);
const [panZoomRef, setPanZoomRef] = useState(null);
const [isPrintDialogOpen, setPrintDialogOpen] = useState(false);
return (
<Provider
@ -14,6 +15,8 @@ const StateProvider = ({ children }) => {
setPageRef,
panZoomRef,
setPanZoomRef,
isPrintDialogOpen,
setPrintDialogOpen,
}}
>
{children}