make open dashboard an anchor, and close the preview-navigate verify
Four navigates were flagged; one was real. The two ProjectPreview lines are void — Projects was deleted in July. Of the two in DashboardPreview, the create path writes the dashboard and then goes there, which a link cannot express, so it stays. The Open Dashboard button in the edit form was pure navigation and is now a link. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -395,10 +395,14 @@ const CreatePanel = () => {
|
||||
<Plus className="h-4 w-4 mr-1" />
|
||||
{isEditing ? 'Update Dashboard' : 'Create Dashboard'}
|
||||
</Button>
|
||||
{/* Pure navigation, so it is an anchor. The create button above stays a button on purpose: it
|
||||
writes a dashboard and *then* goes there, and a link cannot express the "and then". */}
|
||||
{isEditing && (
|
||||
<Button onClick={() => navigate(`/dashboards/${editingId}`)} variant="outline" className="cursor-pointer">
|
||||
<ArrowRight className="h-4 w-4 mr-1" />
|
||||
Open Dashboard
|
||||
<Button asChild variant="outline" className="cursor-pointer">
|
||||
<Link to={`/dashboards/${editingId}`}>
|
||||
<ArrowRight className="h-4 w-4 mr-1" />
|
||||
Open Dashboard
|
||||
</Link>
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user