Closed rrchai closed 3 months ago
I realize the challenge card has incentive information. To avoid calling the function hundreds of times to get incentive label for each challenge card, I will change to create a separate mapping file for label-value.
When I was trying to update the incentive in the challenge card component, all pages displayed blank with an error indicating that loading the footer failed. Here is the error message.
statistics-viewer.component.ts:13 Uncaught TypeError: Cannot read properties of undefined (reading 'FooterComponent')
at Module.FooterComponent (statistics-viewer.component.ts:13:72)
at 72716 (challenge-search.component.ts:83:5)
at __webpack_require__ (bootstrap:19:1)
at 17844 (challenge-search.component.ts:87:34)
at __webpack_require__ (bootstrap:19:1)
at 15392 (variables.ts:9:2)
at __webpack_require__ (bootstrap:19:1)
at 71604 (mock-avatars.ts:14:2)
at __webpack_require__ (bootstrap:19:1)
at 65488 (statistics-viewer.component.ts:13:72)
I noticed this issue when I shared the mapping file in the challenge-search
library via index.ts
. However, the error disappears if I share it in the ui
library. I'm not sure if it's related to a recurring module loading issue.
I noticed this issue when I shared the mapping file in the challenge-search library via index.ts. However, the error disappears if I share it in the ui library. I'm not sure if it's related to a recurring module loading issue.
challenge-search
/challenge
:challenge-search
/challenge
depends on ui
(which includes challenge-card
).challenge-card
depends on challenge-search
/challenge
for mappings.The new mapping file cannot be in the challenge
/challenge-search
lib to avoid the error.
challenge-search
:challenge-search
for mappings.challenge-search
depends on ui
(which includes challenge-card
).challenge-card
depends on the reusable function for mappings.This approach is not doable, as the reusable function needs to be isolated from challenge-search
to avoid the error, unless creating/moving a mapping file. Or directly import the mapping file from challenge-search
, see this comment.
I am creating a pipe directly importing the existing mapping file from challenge-search
.
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
No data about Duplication
Changelog
util
lib to convert the enum value of a challenge property into a label name based on the mapping filelocated in thestored locally.challenge-search
component