mirror of
https://github.com/Nezumi-2711/onedrive-vercel-index.git
synced 2026-09-22 13:38:45 +00:00
fix error null type
This commit is contained in:
@@ -2,10 +2,10 @@ import axios from 'axios'
|
|||||||
import { useEffect, useState } from 'react'
|
import { useEffect, useState } from 'react'
|
||||||
|
|
||||||
// Custom hook to fetch raw file content on mount
|
// Custom hook to fetch raw file content on mount
|
||||||
export default function useFileContent(odRawUrl: string): { content: string; error: null; validating: boolean } {
|
export default function useFileContent(odRawUrl: string): { content: string; error: string; validating: boolean } {
|
||||||
const [content, setContent] = useState('')
|
const [content, setContent] = useState('')
|
||||||
const [validating, setValidating] = useState(true)
|
const [validating, setValidating] = useState(true)
|
||||||
const [error, setError] = useState(null)
|
const [error, setError] = useState('')
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
axios
|
axios
|
||||||
|
|||||||
Reference in New Issue
Block a user