Skip to content

Commit fa9c688

Browse files
authored
edit: tutorial/address-book Active Link Styling in sidebar (#12968)
* tutorial/address-book: edit Active Link Styling in sidebar After returning from the contacts/:contactId/edit page to contacts/:contactId page active link styling will disappear for the contact that has first name and middle name like "Kent C. + Doods" because the URL will be /contacts/kent c.-doods or /contacts/%20c.-doods. So, in the /app/data.ts in the last line where ids are added for every contact created I fixed this small issue with the split and join methods on the contact.id so the sidebar NavLink styling is corrected. * Update contributors.yml majamarijan added * Update contributors.yml edit majamarijan
1 parent 773cf87 commit fa9c688

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

contributors.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@
195195
- m-dad
196196
- m-shojaei
197197
- machour
198+
- majamarijan
198199
- Manc
199200
- manzano78
200201
- marc2332

tutorials/address-book/app/data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,6 @@ export async function deleteContact(id: string) {
311311
].forEach((contact) => {
312312
fakeContacts.create({
313313
...contact,
314-
id: `${contact.first.toLowerCase()}-${contact.last.toLocaleLowerCase()}`,
314+
id: `${contact.first.toLowerCase().split(' ').join('_')}-${contact.last.toLocaleLowerCase()}`,
315315
});
316316
});

0 commit comments

Comments
 (0)