chore: better Prettier config for easier reviews

This commit is contained in:
2023-10-23 23:26:27 +02:00
parent 1224ece116
commit a49e844c70
50 changed files with 4642 additions and 3862 deletions

View File

@ -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]