We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1afb702 commit e960d77Copy full SHA for e960d77
src/apps/review/src/lib/hooks/useFetchScorecard.ts
@@ -1,10 +1,10 @@
1
+import { toast } from 'react-toastify'
2
import useSWR, { SWRResponse } from 'swr'
3
4
import { EnvironmentConfig } from '~/config'
5
import { xhrGetAsync } from '~/libs/core'
6
7
import { Scorecard } from '../models'
-import { toast } from 'react-toastify'
8
9
const baseUrl = `${EnvironmentConfig.API.V6}/review`
10
@@ -23,10 +23,10 @@ export function useFetchScorecard(id: string | undefined): ScorecardResponse {
23
id ? `${baseUrl}/scorecards/${id}` : null,
24
fetcher,
25
{
26
- onError: (err) => {
+ onError: err => {
27
toast.error(err.message)
28
- }
29
+ },
30
)
31
32
return {
0 commit comments