chore: better Prettier config for easier reviews
This commit is contained in:
@ -1,14 +1,14 @@
|
||||
import { useState } from 'react'
|
||||
import { useState } from "react"
|
||||
|
||||
export const fetchState = ['idle', 'loading', 'error', 'success'] as const
|
||||
export const fetchState = ["idle", "loading", "error", "success"] as const
|
||||
|
||||
export type FetchState = (typeof fetchState)[number]
|
||||
|
||||
export const useFetchState = (
|
||||
initialFetchState: FetchState = 'idle'
|
||||
initialFetchState: FetchState = "idle",
|
||||
): [
|
||||
fetchState: FetchState,
|
||||
setFetchState: React.Dispatch<React.SetStateAction<FetchState>>
|
||||
setFetchState: React.Dispatch<React.SetStateAction<FetchState>>,
|
||||
] => {
|
||||
const [fetchState, setFetchState] = useState<FetchState>(initialFetchState)
|
||||
return [fetchState, setFetchState]
|
||||
|
Reference in New Issue
Block a user