load item path on result mount

This commit is contained in:
spencerwooo
2022-01-24 20:31:17 +08:00
parent 0b55fe5fc7
commit 17263feea9
3 changed files with 132 additions and 33 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ import axios from 'axios'
import { useEffect, useState } from 'react'
// Custom hook to fetch raw file content on mount
export default function useAxiosGet(fetchUrl: string): { content: string; error: string; validating: boolean } {
export default function useAxiosGet(fetchUrl: string): { content: any; error: string; validating: boolean } {
const [content, setContent] = useState('')
const [validating, setValidating] = useState(true)
const [error, setError] = useState('')