mirror of
https://github.com/He4eT/elseifplayer.git
synced 2026-05-05 09:27:23 +00:00
Rename components files to JSX
This commit is contained in:
parent
a100cbef4f
commit
884c53d6ae
8 changed files with 0 additions and 0 deletions
|
|
@ -1,15 +0,0 @@
|
|||
import { h } from 'preact'
|
||||
|
||||
export default function ({ setTargetName, setTargetUrl }) {
|
||||
const fileInputHandler = ({ target }) => {
|
||||
const file = target.files[0]
|
||||
setTargetName(file.name)
|
||||
setTargetUrl(`${URL.createObjectURL(file)}#${file.name}`)
|
||||
target.value = null
|
||||
}
|
||||
|
||||
return (
|
||||
<input
|
||||
type='file'
|
||||
onChange={fileInputHandler} />)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue