adrianhorning08 / vinyasa

Asana clone. Rails backend, React frontend.
8 stars 3 forks source link

Trying to filter the project list #10

Closed adrianhorning08 closed 6 years ago

adrianhorning08 commented 6 years ago

Trying to filter the project list based on the team. But it looks like I don't have access to params, which is how I'm trying to find the Team Id. It seems like if I am at a specific url that I should have access to the url, then just get the id of the url.

adrianhorning08 commented 6 years ago

There was an issue with my ajax call and routes.

adrianhorning08 commented 6 years ago

Now it doesn't update when I click to a new page.

adrianhorning08 commented 6 years ago

That was crazy. I refactored everything. I got rid of theRoute to='dashboard/teams/:teamId'. I thought I needed to do that to get params. But instead, just wrapped it in withRouter and used the location to get the teamId. My components are way more organized too. I made some of them functional components because I didn't need to map state or dispatch to props.