()
| 5 | import useDispatch from '~hooks/useDispatch' |
| 6 | |
| 7 | const ImportMenuItem = () => { |
| 8 | const dispatch = useDispatch() |
| 9 | |
| 10 | return ( |
| 11 | <MenuItem |
| 12 | onClick={async () => { |
| 13 | const components = await loadFromJSON() |
| 14 | dispatch.components.reset(components) |
| 15 | }} |
| 16 | > |
| 17 | <Box mr={2} as={FiUpload} /> |
| 18 | Import components |
| 19 | </MenuItem> |
| 20 | ) |
| 21 | } |
| 22 | |
| 23 | export default ImportMenuItem |
nothing calls this directly
no test coverage detected