UniversityDAO / udao

The official UniversityDAO DApp repository.
GNU Lesser General Public License v2.1
4 stars 4 forks source link

Refactor React Grants and Proposals components #46

Closed oslfmt closed 2 years ago

oslfmt commented 2 years ago

Refer to this comment: https://github.com/UniversityDAO/udao/pull/44#discussion_r928131291

oslfmt commented 2 years ago

I would've imagined something more like: the html code this Grants component returns, returns another 2 child components, which are identical cards, maybe something like <CardContainer />. Each of these components takes a props, which are the activeGrants and inactiveGrants you have here. Then within CardContainer, you render each element in the props as a GrantCard or something. Essentially, CardContainer is just a reusable template component. It can even be reused on the proposals page and dashboard.

austin-davis1 commented 2 years ago

That's a good idea, I will keep this in mind. This won't be an immediate priority for me, but once I get some free time from other issues I will definitely take a stab at this

oslfmt commented 2 years ago

I see why you choose to implement it this way after looking more closely at the react code. I started work on this in a PR so you can take a look. The strategy I outlined above might have to be slightly modifier.

jagger-harris commented 2 years ago

I think we might be able to close this issue now with the new frontend.

oslfmt commented 2 years ago

Closing as new frontend fixes this