Skip to content

Commit

Permalink
Merge pull request #822 from alexstotsky/refactor-export-btn
Browse files Browse the repository at this point in the history
(improvements) Export menu toggler
  • Loading branch information
ezewer authored Jun 12, 2024
2 parents 97d5f16 + 466f75c commit a619eb6
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 66 deletions.
18 changes: 0 additions & 18 deletions src/components/Header/Export/Export.container.js

This file was deleted.

21 changes: 10 additions & 11 deletions src/components/Header/Export/Export.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
import React, { memo } from 'react'
import PropTypes from 'prop-types'
import React from 'react'
import { useDispatch } from 'react-redux'
import { useTranslation } from 'react-i18next'

import Icon from 'icons'
import { tracker } from 'utils/trackers'
import { toggleExportDialog } from 'state/ui/actions'

const Export = ({ t, toggleDialog }) => {
const Export = () => {
const { t } = useTranslation()
const dispatch = useDispatch()
const toggleExport = () => {
tracker.trackEvent('Export', 'Navigation')
toggleDialog()
dispatch(toggleExportDialog())
}

return (
<div
className='export'
onClick={() => toggleExport()}
onClick={toggleExport}
>
<Icon.FILE_EXPORT />
<span>
Expand All @@ -23,9 +27,4 @@ const Export = ({ t, toggleDialog }) => {
)
}

Export.propTypes = {
t: PropTypes.func.isRequired,
toggleDialog: PropTypes.func.isRequired,
}

export default memo(Export)
export default Export
2 changes: 1 addition & 1 deletion src/components/Header/Export/index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from './Export.container'
export { default } from './Export'
13 changes: 0 additions & 13 deletions src/ui/ExportButton/ExportButton.container.js

This file was deleted.

20 changes: 0 additions & 20 deletions src/ui/ExportButton/ExportButton.js

This file was deleted.

3 changes: 0 additions & 3 deletions src/ui/ExportButton/index.js

This file was deleted.

0 comments on commit a619eb6

Please sign in to comment.