fix: 修复项目相关页面路由前缀为 /dashboard
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -140,7 +140,7 @@ export default function ImportDialog({ onClose }: { onClose: () => void }) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex justify-end">
|
<div className="flex justify-end">
|
||||||
<button onClick={() => navigate(`/projects/${result.project.id}`)} className="btn-primary">Go to Project</button>
|
<button onClick={() => navigate(`/dashboard/projects/${result.project.id}`)} className="btn-primary">Go to Project</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ export default function Projects() {
|
|||||||
<div className="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4 stagger-children">
|
<div className="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4 stagger-children">
|
||||||
{projects?.map((p) => (
|
{projects?.map((p) => (
|
||||||
<div key={p.id} className="card card-hover group relative">
|
<div key={p.id} className="card card-hover group relative">
|
||||||
<Link to={`/projects/${p.id}`} className="block p-5">
|
<Link to={`/dashboard/projects/${p.id}`} className="block p-5">
|
||||||
<h3 className="text-[14px] font-medium text-text-primary group-hover:text-accent transition-colors">{p.name}</h3>
|
<h3 className="text-[14px] font-medium text-text-primary group-hover:text-accent transition-colors">{p.name}</h3>
|
||||||
{p.description && <p className="text-[13px] text-text-muted mt-1.5 line-clamp-2 leading-relaxed">{p.description}</p>}
|
{p.description && <p className="text-[13px] text-text-muted mt-1.5 line-clamp-2 leading-relaxed">{p.description}</p>}
|
||||||
<div className="mt-3 flex items-center gap-1.5 flex-wrap">
|
<div className="mt-3 flex items-center gap-1.5 flex-wrap">
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export default function ProjectSettings({ project }: { project: Project }) {
|
|||||||
|
|
||||||
const deleteMutation = useMutation({
|
const deleteMutation = useMutation({
|
||||||
mutationFn: () => apiFetch(`/projects/${project.id}`, { method: 'DELETE' }),
|
mutationFn: () => apiFetch(`/projects/${project.id}`, { method: 'DELETE' }),
|
||||||
onSuccess: () => { queryClient.invalidateQueries({ queryKey: ['projects'] }); navigate('/'); },
|
onSuccess: () => { queryClient.invalidateQueries({ queryKey: ['projects'] }); navigate('/dashboard'); },
|
||||||
});
|
});
|
||||||
|
|
||||||
const handleReimportSuccess = () => {
|
const handleReimportSuccess = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user