fix(layout): highlight write nav for both /write and /write/:id

This commit is contained in:
xfy 2026-06-05 17:55:18 +08:00
parent 4805f915c7
commit 077573af67

View File

@ -46,7 +46,7 @@ pub fn AdminLayout() -> Element {
NavItemConfig {
route: Route::Write {},
label: "写文章",
is_active: matches!(route, Route::Write {}),
is_active: matches!(route, Route::Write {}) || matches!(route, Route::WriteEdit { .. }),
},
NavItemConfig {
route: Route::Posts {},