fix(web): navigate indefinido em ClientsPage + deprecations AntD 6.x

Adiciona useNavigate() no corpo de ClientsPage (faltava; sub-componentes já tinham).
Substitui Space direction→orientation (4 ocorrências) e Progress trailColor→railColor.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-24 17:47:14 +00:00
parent 3413fa7003
commit fc6cc4c534
2 changed files with 6 additions and 5 deletions

View File

@@ -277,7 +277,7 @@ function CustomerPortfolioCard({ stats }: { stats: PortfolioStats }) {
)}
</div>
<Space direction="vertical" size={6} style={{ width: '100%', marginBottom: 16 }}>
<Space orientation="vertical" size={6} style={{ width: '100%', marginBottom: 16 }}>
{legendItems.map((item) => {
const pct = total > 0 ? ((item.value / total) * 100).toFixed(1) : '0.0';
return (
@@ -475,7 +475,7 @@ function CustomerDetailsDrawer({
</Space>
}
>
<Space direction="vertical" size={20} style={{ width: '100%' }}>
<Space orientation="vertical" size={20} style={{ width: '100%' }}>
{/* Identificação */}
<Card
style={{ borderRadius: 8, background: '#F8FAFC', border: '1px solid #EBF0F5' }}
@@ -626,7 +626,7 @@ function CustomerDetailsDrawer({
{loadingOrders ? (
<Spin size="small" />
) : (
<Space direction="vertical" size={6} style={{ width: '100%' }}>
<Space orientation="vertical" size={6} style={{ width: '100%' }}>
{orders.slice(0, 5).map((p) => (
<div
key={p.id}
@@ -760,7 +760,7 @@ function CustomerAnalysisDrawer({
placement="right"
styles={{ body: { padding: '16px 24px' } }}
>
<Space direction="vertical" size={20} style={{ width: '100%' }}>
<Space orientation="vertical" size={20} style={{ width: '100%' }}>
<div>
<Text strong style={{ fontSize: 17, color: '#1F2937', display: 'block' }}>
{summary.nome}
@@ -1042,6 +1042,7 @@ export function ClientsPage() {
const screens = useBreakpoint();
const isMobile = !screens.md;
const { message: msg } = App.useApp();
const navigate = useNavigate();
const stats = usePortfolioStats();