Skip to content

Card viewing problem with Redux #76

@austin-davis1

Description

@austin-davis1

@jagger-harris brought this to my attention:

If a user clicks on a card and then goes to refresh, the site will land on an empty page (nothing has rendered).

Reason: Currently when someone clicks a card we push this cards data into the Redux store. Then, we route to a view proposal page that will take whatever card data is pushed into redux and display that data. The problem is, the Redux store will clear out completely upon page refresh (ie app re-render). So then we are still on this view proposal page, but Redux has no selected proposal now in its store and thus the page is completely gone.

Potential fix: One way to solve this problem (and eliminate the need for Redux) would be to create a mapping of Routes in app.jsx. For instance we would grab all the proposal data for the site (getAllProposals function) and then map each one of these values to a single route. That way we create an individual (and unique) URL for every single proposal we have. If someone is on a specific proposal (which has its own specific URL) and they refresh, they will end up back on that same page.

I do think it's neat using Redux to create one singular page that just filters what we see, instead of making a new page for every single proposal via a mapping. Maybe there could be a way to preserve Redux state through a refresh so that it doesn't get lost in the process? Just another potential idea.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriorityget done asap

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions