fix(frontend): remove locale-dependent routing and migrate to centralized locale-aware router

- Replaced `next/navigation` with `@/lib/i18n/routing` across components, pages, and tests.
- Removed redundant `locale` props from `ProjectWizard` and related pages.
- Updated navigation to exclude explicit `locale` in paths.
- Refactored tests to use mocks from `next-intl/navigation`.
This commit is contained in:
2026-01-03 01:34:53 +01:00
parent a79d923dc1
commit da5affd613
9 changed files with 42 additions and 62 deletions

View File

@@ -92,18 +92,8 @@ jest.mock('@/lib/hooks/useProjectEvents', () => ({
useProjectEvents: jest.fn(() => mockUseProjectEventsResult),
}));
// Mock next/navigation
const mockPush = jest.fn();
jest.mock('next/navigation', () => ({
useRouter: () => ({
push: mockPush,
back: jest.fn(),
forward: jest.fn(),
refresh: jest.fn(),
replace: jest.fn(),
prefetch: jest.fn(),
}),
}));
// Import mock from next-intl/navigation mock (used by @/lib/i18n/routing)
import { mockPush } from 'next-intl/navigation';
describe('ProjectDashboard', () => {
const projectId = 'test-project-123';