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:
2026-08-07 12:50:59 +00:00
co-authored by Claude Opus 5
parent 667d622918
commit bbcb041ef3
2 changed files with 23 additions and 13 deletions
@@ -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>