Skip to content

Commit bd5b104

Browse files
JerrettDavisclaude
andcommitted
fix: use proper Blazor syntax for NavLink href with dynamic value
Changed NavLink href from "/blog/@Post.Id" to @($"/blog/{Post.Id}") to fix compilation error. NavLink component attributes require proper Blazor syntax for dynamic values, not HTML-style @ interpolation. Error was: "Component attributes do not support complex content" Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
1 parent 1a6cc63 commit bd5b104

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

JdhPro.Web/Components/Blog/PostCard.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@using JdhPro.Web.Models
22

33
<article class="tech-card bg-gray-900 border-@AccentColor/30 p-6 hover:border-@AccentColor/60 transition-all duration-300 group">
4-
<NavLink href="/blog/@Post.Id" class="block space-y-4">
4+
<NavLink href="@($"/blog/{Post.Id}")" class="block space-y-4">
55

66
@* Header with date and source indicator *@
77
<div class="flex items-center justify-between gap-3">

0 commit comments

Comments
 (0)