Bug fixes

Fixed a few bugs from previous patch.

- Removed default value for --input tag. It was causing the front end to trigger a request and throw an error when there was no input given.
- Added a check to see if input is provided or not
- Converted the new hook to Typescript and added necessary types.
- Rebuilt to update to current changes.
This commit is contained in:
blessedcoolant
2022-03-25 13:49:56 +13:00
parent a2d7851a40
commit 7c7daf8ade
2 changed files with 10 additions and 11 deletions

View File

@@ -1,7 +1,7 @@
import { useCallback, useEffect, useState } from 'react'
export default function useInputImage() {
const [inputImage, setInputImage] = useState()
const [inputImage, setInputImage] = useState<File>()
const fetchInputImage = useCallback(() => {
fetch('/inputimage')