Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeTrevor committed Sep 22, 2021
1 parent 01f2a8b commit 5dfaa84
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/components/INPUTS/camera/CamMobile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,25 @@ interface camMobileProps {
}

const CamMobile: FC<camMobileProps> = ({ setFile }) => {
let hasCamera: boolean;

function handleInput(e: React.ChangeEvent<HTMLInputElement>) {
let files = e.target.files;
if (files) {
let file = files[0];
setFile(file);
if (file) setFile(file);
}
}

return (
<div>
<label className="inputOption">
<input
type="file"
name="image"
accept="image/*"
capture="environment"
capture="camera"
onInput={handleInput}
>
{misc.Camera}
</input>
</div>
/>
{misc.Camera}
</label>
);
};

Expand Down

0 comments on commit 5dfaa84

Please sign in to comment.