Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: uploadcare/react-widget
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3d2b4019714d8441fcae32d829e8c426c84942e7
Choose a base ref
..
head repository: uploadcare/react-widget
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 51e9f217793e96a9556b11f9956e25075fee4be3
Choose a head ref
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/uploader.js
8 changes: 4 additions & 4 deletions src/uploader.js
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ import React, {
} from 'react'
import uploadcare from 'uploadcare-widget'

import { defaultPreviewUrlCallback } from './default-preview-url-callback'
import {defaultPreviewUrlCallback} from './default-preview-url-callback'
import {
useCommitedCallback,
useCustomTabs,
@@ -19,7 +19,7 @@ const useWidget = (
{
id,
name,
value, //@deprecated
value, // @deprecated
defaultValue,
onFileSelect,
onChange,
@@ -196,15 +196,15 @@ const useWidget = (
)

return useCallback(
() => <input type="hidden" ref={input} id={id} name={name} />,
() => <input type="hidden" ref={input} id={id} name={name}/>,
[id, name]
)
}

const Uploader = (props) => {
const Input = useWidget(props, uploadcare)

return <Input />
return <Input/>
}

export default Uploader