refactor: 将 enum key的格式改为 PascalCase

This commit is contained in:
qier222 2022-04-16 22:39:51 +08:00
parent 0061a66124
commit 7e892997bd
No known key found for this signature in database
GPG key ID: 9C85007ED905F14D
36 changed files with 141 additions and 142 deletions

View file

@ -3,7 +3,7 @@ import useUser from './useUser'
import { useQueryClient } from 'react-query'
import { IpcChannels } from '@/shared/IpcChannels'
import { APIs } from '@/shared/CacheAPIs'
import { fetchUserLikedTracksIDs } from 'api/user'
import { fetchUserLikedTracksIDs } from '../api/user'
import {
FetchUserLikedTracksIDsResponse,
UserApiNames,
@ -14,7 +14,7 @@ export default function useUserLikedTracksIDs() {
const uid = user?.account?.id ?? 0
return useQuery(
[UserApiNames.FETCH_USER_LIKED_TRACKS_IDS, uid],
[UserApiNames.FetchUserLikedTracksIds, uid],
() => fetchUserLikedTracksIDs({ uid }),
{
enabled: !!(uid && uid !== 0),
@ -35,7 +35,7 @@ export const useMutationLikeATrack = () => {
const { data: user } = useUser()
const { data: userLikedSongs } = useUserLikedTracksIDs()
const uid = user?.account?.id ?? 0
const key = [UserApiNames.FETCH_USER_LIKED_TRACKS_IDS, uid]
const key = [UserApiNames.FetchUserLikedTracksIds, uid]
return useMutation(
async (trackID: number) => {