fix crush
This commit is contained in:
@@ -209,7 +209,7 @@ export async function fetchViolationAnalyticStatistic(group: 'domain' | 'tld') {
|
||||
}
|
||||
}
|
||||
|
||||
export async function fetchViolationStatistic(id: string) {
|
||||
export async function fetchViolationStatistic(id?: string) {
|
||||
const token = await getSessionData('token');
|
||||
|
||||
try {
|
||||
@@ -220,7 +220,7 @@ export async function fetchViolationStatistic(id: string) {
|
||||
msg_id: 30010,
|
||||
message_body: {
|
||||
token: token,
|
||||
file_id: id
|
||||
...(id && { file_id: id })
|
||||
}
|
||||
}),
|
||||
headers: {
|
||||
|
||||
@@ -10,7 +10,7 @@ export interface UseViolationStatistic {
|
||||
total_law_cases: number
|
||||
}
|
||||
|
||||
export const useViolationStatistic = (id: string) => {
|
||||
export const useViolationStatistic = (id?: string) => {
|
||||
return useQuery({
|
||||
queryKey: ['violationStatistic'],
|
||||
queryFn: () => {
|
||||
|
||||
Reference in New Issue
Block a user