chore(types): fix tsconfig to exclude desktop from Next TS check; remove unused vars and fix hook deps; clean up remaining lint warnings
This commit is contained in:
parent
6ffd6c6392
commit
6d69fcfa3c
4 changed files with 8 additions and 12 deletions
|
|
@ -37,7 +37,7 @@ export async function GET(request: Request) {
|
|||
role: session.user.role.toUpperCase(),
|
||||
})
|
||||
viewerId = ensuredUser?._id ?? null
|
||||
} catch (_error) {
|
||||
} catch {
|
||||
return NextResponse.json({ error: "Falha ao sincronizar usuário com Convex" }, { status: 500 })
|
||||
}
|
||||
if (!viewerId) return NextResponse.json({ error: "Usuário não encontrado no Convex" }, { status: 403 })
|
||||
|
|
@ -75,7 +75,7 @@ export async function GET(request: Request) {
|
|||
"Cache-Control": "no-store",
|
||||
},
|
||||
})
|
||||
} catch (_error) {
|
||||
} catch {
|
||||
return NextResponse.json({ error: "Falha ao gerar CSV de horas por cliente" }, { status: 500 })
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
"use client"
|
||||
|
||||
import { useEffect, useMemo, useState, useTransition } from "react"
|
||||
import { useCallback, useEffect, useState, useTransition } from "react"
|
||||
import { toast } from "sonner"
|
||||
|
||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"
|
||||
|
|
@ -52,7 +52,7 @@ export function AdminCompaniesManager({ initialCompanies }: { initialCompanies:
|
|||
setForm({ ...c })
|
||||
}
|
||||
|
||||
async function loadLastAlerts(list: Company[] = companies) {
|
||||
const loadLastAlerts = useCallback(async (list: Company[] = companies) => {
|
||||
if (!list || list.length === 0) return
|
||||
const params = new URLSearchParams({ slugs: list.map((c) => c.slug).join(",") })
|
||||
try {
|
||||
|
|
@ -62,9 +62,9 @@ export function AdminCompaniesManager({ initialCompanies }: { initialCompanies:
|
|||
} catch {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
}, [companies])
|
||||
|
||||
useEffect(() => { void loadLastAlerts(companies) }, [companies])
|
||||
useEffect(() => { void loadLastAlerts(companies) }, [loadLastAlerts, companies])
|
||||
|
||||
async function handleSubmit(e: React.FormEvent) {
|
||||
e.preventDefault()
|
||||
|
|
|
|||
|
|
@ -308,11 +308,7 @@ export function TicketSummaryHeader({ ticket }: TicketHeaderProps) {
|
|||
}, [
|
||||
ticket.id,
|
||||
ticket.workSummary,
|
||||
ticket.workSummary?.totalWorkedMs,
|
||||
ticket.workSummary?.internalWorkedMs,
|
||||
ticket.workSummary?.externalWorkedMs,
|
||||
ticketActiveSession,
|
||||
ticketActiveSession?.id,
|
||||
ticketActiveSessionStartedAtMs,
|
||||
ticketActiveSessionWorkType,
|
||||
])
|
||||
|
|
|
|||
|
|
@ -23,6 +23,6 @@
|
|||
"@/convex/*": ["./convex/*"]
|
||||
}
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||
"exclude": ["node_modules", "apps/desktop/**"]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue