Skip to content

Commit

Permalink
fix(mespapiers): ScanResultWrapper use right helper
Browse files Browse the repository at this point in the history
  • Loading branch information
Merkur39 committed May 30, 2023
1 parent 39d5491 commit 5737ab7
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import ScanResultTitle from './ScanResultTitle'
import { PaperDefinitionsStepPropTypes } from '../../../constants/PaperDefinitionsPropTypes'
import { KEYS } from '../../../constants/const'
import { useStepperDialog } from '../../Hooks/useStepperDialog'
import { makeFileFromImageSource } from '../helpers'
import { makeFileFromBase64 } from '../helpers'

const ScanResultWrapper = ({
currentFile,
Expand All @@ -28,12 +28,12 @@ const ScanResultWrapper = ({
const { isMobile } = useBreakpoints()
const { nextStep } = useStepperDialog()

const onValid = async addPage => {
const onValid = addPage => {
if (rotationImage % 360 !== 0) {
const newFile = await makeFileFromImageSource({
imageSrc: imageRef.current.src,
imageName: currentFile.name,
imageType: currentFile.type
const newFile = makeFileFromBase64({
source: imageRef.current.src,
name: currentFile.name,
type: currentFile.type
})
onChangeFile(newFile, { replace: true })
}
Expand Down

0 comments on commit 5737ab7

Please sign in to comment.