Refactor TypeScript interfaces and types for consistency and readability
Gitea Auto Deploy / Deploy-Container (push) Successful in 49s
Gitea Auto Deploy / Deploy-Container (push) Successful in 49s
- Reformatted multiple TypeScript interfaces across various files to ensure consistent spacing and indentation. - Updated `changelog.ts`, `enka.ts`, `extraData.ts`, `gloval.d.ts`, `index.ts`, `lightconeDetail.ts`, `metaData.ts`, `mics.ts`, `modelConfig.ts`, `monsterDetail.ts`, `peakDetail.ts`, `pfDetail.ts`, `psConnect.ts`, `relicDetail.ts`, `showcase.ts`, `srtools.ts`, and `zod/index.ts` for improved code clarity. - Ensured all interfaces are properly formatted with consistent line breaks and spacing. - Made minor adjustments to the `tsconfig.json` file for formatting consistency.
This commit is contained in:
@@ -1,25 +1,25 @@
|
||||
"use client"
|
||||
import { useQuery } from '@tanstack/react-query'
|
||||
import { getLightconeListApi } from '@/lib/api';
|
||||
import { useEffect } from 'react'
|
||||
import { toast } from 'react-toastify'
|
||||
import useDetailDataStore from '@/stores/detailDataStore';
|
||||
|
||||
export const useFetchLightconeData = () => {
|
||||
const { setMapLightCone } = useDetailDataStore()
|
||||
const query = useQuery({
|
||||
queryKey: ['lightconeData'],
|
||||
queryFn: getLightconeListApi,
|
||||
staleTime: 1000 * 60 * 5,
|
||||
})
|
||||
|
||||
useEffect(() => {
|
||||
if (query.data && !query.error) {
|
||||
setMapLightCone(query.data)
|
||||
} else if (query.error) {
|
||||
toast.error("Failed to load lightcone data")
|
||||
}
|
||||
}, [query.data, query.error, setMapLightCone])
|
||||
|
||||
return query
|
||||
}
|
||||
"use client"
|
||||
import { useQuery } from '@tanstack/react-query'
|
||||
import { getLightconeListApi } from '@/lib/api';
|
||||
import { useEffect } from 'react'
|
||||
import { toast } from 'react-toastify'
|
||||
import useDetailDataStore from '@/stores/detailDataStore';
|
||||
|
||||
export const useFetchLightconeData = () => {
|
||||
const { setMapLightCone } = useDetailDataStore()
|
||||
const query = useQuery({
|
||||
queryKey: ['lightconeData'],
|
||||
queryFn: getLightconeListApi,
|
||||
staleTime: 1000 * 60 * 5,
|
||||
})
|
||||
|
||||
useEffect(() => {
|
||||
if (query.data && !query.error) {
|
||||
setMapLightCone(query.data)
|
||||
} else if (query.error) {
|
||||
toast.error("Failed to load lightcone data")
|
||||
}
|
||||
}, [query.data, query.error, setMapLightCone])
|
||||
|
||||
return query
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user