mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-24 11:03:17 -04:00
fix(curriculum): return empty string in Reusable Profile Card Component (#60801)
This commit is contained in:
@@ -16,7 +16,7 @@ Also, return a pair of parentheses with an empty string inside for now.
|
||||
|
||||
# --hints--
|
||||
|
||||
You should create and export a `Card` functional component. Don't forget to return an empty string inside it.
|
||||
You should create and export a `Card` functional component.
|
||||
|
||||
```js
|
||||
assert.isFunction(window.index.Card);
|
||||
@@ -33,6 +33,15 @@ assert.match(functionDefinition, /\{[^{]*title[^{]*\}/);
|
||||
assert.match(functionDefinition, /\{[^{]*bio[^{]*\}/);
|
||||
```
|
||||
|
||||
Your `Card` component should return an empty string.
|
||||
|
||||
```js
|
||||
const functionRegex = __helpers.functionRegex("Card", null, { capture: true });
|
||||
const match = code.match(functionRegex);
|
||||
const functionDefinition = match[0];
|
||||
assert.match(functionDefinition, /\s*{\s*return\s*\(\s*(''|""|``)\s*\)\s*}|\s*=>\s*\(\s*(''|""|``)\s*\)/);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
## --seed-contents--
|
||||
|
||||
Reference in New Issue
Block a user