1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

useIpfs fixes

This commit is contained in:
Matthias Kretschmann 2019-09-23 17:37:16 +02:00
parent 60a570892b
commit c63325bdf2
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -11,7 +11,7 @@ let ipfsVersion = ''
export default function useIpfs() { export default function useIpfs() {
const [isIpfsReady, setIpfsReady] = useState(Boolean(ipfs)) const [isIpfsReady, setIpfsReady] = useState(Boolean(ipfs))
const [ipfsError, setIpfsError] = useState(null) const [ipfsError, setIpfsError] = useState('')
useEffect(() => { useEffect(() => {
async function startIpfs() { async function startIpfs() {
@ -64,7 +64,7 @@ export default function useIpfs() {
ipfs = null ipfs = null
ipfsMessage = '' ipfsMessage = ''
ipfsVersion = '' ipfsVersion = ''
setIpfsError(null) setIpfsError('')
console.timeEnd('IPFS stopped') console.timeEnd('IPFS stopped')
} }
} }