#React-Router-DOM, forms and bits

3 messages · Page 1 of 1 (latest)

midnight furnace
#

Hi guys,

I'm about to cry in a corner! I know I'm missing something really obvious, but I made the ROOKIE mistake of changing my labels and names of things and now I can't make the data from 'AddChildForm' show up in my 'ChildSummary' card... Its something to do with the map I've put a screenshot of but the project itself isn't that straight forward.

I have 'Helpers' in my utilities folder which may be causing some problems, so I'm linking the project below.

Many thanks in advance!

Github >> https://github.com/hannahf86/childcare-invoice-generator/tree/main

GitHub

Contribute to hannahf86/childcare-invoice-generator development by creating an account on GitHub.

shell aspen
#

Hi @midnight furnace, I forked your GitHub repo and looked at your code. In Dashboard.jsx line 76, where you save the loader data in a const, VS Code is warning me that the addChild variable is declared but its value is never read. So my first guess would be that the problem is related to addChild.

It also appears that you're passing the wrong data to ChildSummary.jsx. I tried to console.log family at the top level of the component and got this data in the console:
{id: '7c5df840-beaf-4d9c-b284-b029637d81cd', createdAt: 1697472001794, familyName: 'nn', color: '0 65% 50%'}.

Maybe you need to pass the data stored in the addChild variable to the ChildSummary component?

midnight furnace