Skip to content

Commit

Permalink
Fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
binamkayastha committed Jul 14, 2024
1 parent 2b65ae1 commit 8164d02
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nepalingo-web/src/hooks/useNewari.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ const fetcher = (url: string) => fetch(import.meta.env.VITE_NEPALBHASA_API_URL +
const useNewari = (props: Omit<DictionaryProps, 'language'>) => {
const { data, error, isLoading } = useSWR(`/dict/en/search/${props.word}`, fetcher)
console.log(data,error,isLoading)
let customError= !!data?.errors.length? {status:true, response:data.errors, message: data.errors[0],}:error

const customError= data?.errors.length ? {status:true, response:data.errors, message: data.errors[0],}:error


const response: DictionaryResponse = {
Expand Down

0 comments on commit 8164d02

Please sign in to comment.