mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-22 21:08:12 +08:00
fix(curriculum): explicitly show case for general (#58670)
This commit is contained in:
parent
0972a69bd0
commit
d7880ce24e
@ -26,7 +26,7 @@ Fulfill the user stories below and get all the tests to pass to complete the lab
|
||||
- the text of the `category` key of the selected category.
|
||||
- a class of `category` followed by the `className` property of the selected category.
|
||||
- an `href` with the value of `<forumCategoryUrl>/<className>/<id>`, where `<className>` is the `className` property of the selected category and `id` is the argument passed to `forumCategory`.
|
||||
1. If the `allCategories` object does not have the selected category id as its property, `className` and `category` should be indicated as `general`.
|
||||
1. If the `allCategories` object does not have the selected category id as its property, `category` should be indicated as `General` and `className` should be indicated as `general`.
|
||||
1. You should have a function named `avatars` that takes two arrays representing posters and users, respectively.
|
||||
1. The `avatars` function should return a string made by joining `img` elements, one for each poster found inside the user array. _Hint:_ You can find users by comparing the `user_id` property of the poster with the `id` property` of the user.
|
||||
1. The `avatars` function should set each avatar's size by accessing the `avatar_template` property and replacing `{size}` with `30`.
|
||||
@ -240,7 +240,7 @@ assert.match(
|
||||
);
|
||||
```
|
||||
|
||||
`forumCategory(200)` should return a string containing an anchor element with `class="category career"`.
|
||||
`forumCategory(200)` should return a string containing an anchor element with `class="category general"`.
|
||||
|
||||
```js
|
||||
const actual = forumCategory(200);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user