Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (type === 'products') {
- type = products;
- store.dispatch(Actions.getProducts());
- store.dispatch(setToolbarTitle('Товары'));
- setCurrentType('1');
- setTableTitle('Список товаров');
- } else if (type === 'materials') {
- type=products;
- store.dispatch(Actions.getMaterialTypes());
- store.dispatch(setToolbarTitle('Материалы'));
- setCurrentType('2');
- setTableTitle('Список материалов');
- } else if (type === 'metals') {
- type=products;
- store.dispatch(Actions.getMetalTypes());
- store.dispatch(setToolbarTitle('Металл'));
- setCurrentType('3');
- setTableTitle('Список металлов');
- } else if (type === 'furniture') {
- type=products;
- store.dispatch(Actions.getFurnitureTypes());
- store.dispatch(setToolbarTitle('Фурнитура'));
- setCurrentType('4');
- setTableTitle('Список фурнитуры');
- } else if (type === 'paint') {
- type=products;
- store.dispatch(Actions.getPaintTypes());
- store.dispatch(setToolbarTitle('Краска'));
- setCurrentType('5');
- setTableTitle('Список красок');
- } else if (type === 'details') {
- store.dispatch(Actions.getDetailTypes());
- store.dispatch(setToolbarTitle('Готовая продукция'));
- setCurrentType('6');
- setTableTitle('Список готовой продукции');
- }
- }, []);
- const productsList = useSelector(({ projects }) => projects.type);
Advertisement
Add Comment
Please, Sign In to add comment