forked from cardosofelipe/pragma-stack
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:
@@ -10,7 +10,7 @@
|
||||
*/
|
||||
|
||||
import { useState, use } from 'react';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { useRouter } from '@/lib/i18n/routing';
|
||||
import { Plus, Upload } from 'lucide-react';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Skeleton } from '@/components/ui/skeleton';
|
||||
@@ -25,7 +25,7 @@ interface ProjectIssuesPageProps {
|
||||
}
|
||||
|
||||
export default function ProjectIssuesPage({ params }: ProjectIssuesPageProps) {
|
||||
const { locale, id: projectId } = use(params);
|
||||
const { id: projectId } = use(params);
|
||||
const router = useRouter();
|
||||
|
||||
// Filter state
|
||||
@@ -49,7 +49,7 @@ export default function ProjectIssuesPage({ params }: ProjectIssuesPageProps) {
|
||||
const { data, isLoading, error } = useIssues(projectId, filters, sort);
|
||||
|
||||
const handleIssueClick = (issueId: string) => {
|
||||
router.push(`/${locale}/projects/${projectId}/issues/${issueId}`);
|
||||
router.push(`/projects/${projectId}/issues/${issueId}`);
|
||||
};
|
||||
|
||||
const handleBulkChangeStatus = () => {
|
||||
|
||||
Reference in New Issue
Block a user