Sidebar.tsx 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import React from 'react';
  2. import { useTranslation } from 'react-i18next';
  3. // import Button from '../components/Button';
  4. import Typography from '../components/Typography';
  5. // import Icon from '../components/Icon';
  6. // import CreateForm from './CreateForm';
  7. import MarkupTools from './MarkupTools';
  8. import WatermarkTool from './WatermarkTool';
  9. // import useActions from '../actions';
  10. import useStore from '../store';
  11. // import { BtnWrapper } from '../global/toolStyled';
  12. import { SidebarWrapper } from '../global/otherStyled';
  13. const Sidebar: React.FC = () => {
  14. const { t } = useTranslation('sidebar');
  15. const [{ displayMode }] = useStore();
  16. // const { setSidebar } = useActions(dispatch);
  17. // const onClick = (state: string): void => {
  18. // if (state === sidebarState) {
  19. // setSidebar('');
  20. // } else {
  21. // setSidebar(state);
  22. // }
  23. // };
  24. return (
  25. <SidebarWrapper isHidden={displayMode === 'full'}>
  26. <Typography light style={{ marginLeft: '30px', marginTop: '46px' }} align="left">
  27. {t('mainMenu')}
  28. </Typography>
  29. <MarkupTools />
  30. {/* <CreateForm /> */}
  31. {/* <BtnWrapper>
  32. <Button shouldFitContainer align="left" onClick={(): void => { onClick('add-image'); }}>
  33. <Icon glyph="add-image" style={{ marginRight: '10px' }} />
  34. {t('addImages')}
  35. </Button>
  36. </BtnWrapper> */}
  37. <WatermarkTool />
  38. </SidebarWrapper>
  39. );
  40. };
  41. export default Sidebar;