meilisearch/landing

Transform `getHomepageData` function into `homepageData` object

Closed this issue ยท 5 comments

We currently have every text of the website inside the data folder, separated in different files.

The one for the homepage is the data/homepage.js. It exports a function called getHomepageData which doesn't receive any argument. This is legacy code, and we would like to rework it in order to have an object instead.

What we have to do is:

  • Transform the getHomepageData function of the data/homepage.js file into an object
  • Rename getHomepageData into homepageData in every file that uses it (including the stories folder used by Storybook)

Can I work on this?

Hello @FilipePfluck ๐Ÿ‘‹

Sure go ahead!
Just note that we prefer not assigning people to our issues because sometimes people ask to be assigned and never come back, which discourages volunteer contributors to open a PR to fix this issue.
We will accept and merge the first PR that fixes correctly and well implements the issue following our contributing guidelines.

We are looking forward to reviewing your PR!

Hey @mdubus I believe I already made all the changes needed, and I was going to test just to make sure everything is working properly. I tried to install the dependencied and I got this error:
Screenshot from 2022-10-25 10-29-18
I didn't want to try to solve it myself, since I don't want to mess the dependencied up. Do you have any recommendation?

Hello @FilipePfluck ๐Ÿ‘‹

I see that you are using npm, can you try with yarn instead? Also, can you open your PR with the changes, so that we can discuss it there? It would be a more appropriate place I think ๐Ÿ˜€

Thanks a lot! ๐Ÿ™

Done with 550