Help : how are we getting the entity argument here

hey , I was stuck in this part of code base where i am not able to understand from where the function getting the value of entity argument because there is nowhere I can see this function being called .

Screenshot 2024-01-01 173952

I started contributing recently here and trying to understand parts of codebase so please bare me if I am asking any silly questions :sweat_smile:

also is kiwi channels are not working , I am trying from last two days to connect

Indeed, currently Kiwi IRC - The web IRC client does not work for me as well.

Alternatively you can also use and connect to the #bookbrainz IRC channel from there. I’ve just tried this and it works for me.

You are right, that part of the code is indeed not easy to understand.
EditionDisplayPage is not just a simple function but a React component, which is rendered by the server.
Since BookBrainz has display pages for multiple different entity types (Edition is just one of them) which work in a similar way, there is a generic function which handles all of them:

EntityComponent represents multiple different components/functions, of which EditionDisplayPage (note that it is imported as EditionPage in this module) is one possible value. There is a helper function extractEntityProps which extracts all the parameters which are passed to the component, entity is one of them.

I hope this gets you started, if you want to understand more, you have to follow the trace of props, from where entity is extracted :slight_smile:

1 Like

ohkk I see now …and in the files like EditionDisplay.js we are just selecting what ever props we need and using them right ?

Thanks for pointing this out for , it helped me solving my problem :grinning: