bconnorwhite / local-climbing-route-search

0 stars 0 forks source link

Add page for each problem #10

Open bconnorwhite opened 1 year ago

ghost commented 1 year ago

[!NOTE] Status: Completed ✅ I've completed my work on this issue.

📋 Create a new page for each climbing problem

The application currently displays a list of climbing routes, but there is no dedicated page for each route. We need to create a new page for each climbing problem. This will involve creating a new React component for the problem page, defining a route for it using React Router, and passing the relevant data to the new page. The new page should display detailed information about the climbing problem, such as its name, location, grade, rating, and image. The route for each problem page should include a unique identifier for the problem, such as its index in the list of routes or a unique ID from the data. This identifier will be used to retrieve the relevant data for the problem. The list of routes should be updated to include a link to the new page for each problem. The link should use the Link component from React Router and the path should match the route defined for the problem page.
- [ ] **🔬 Research on React Router and creating new pages** Since the task involves creating a new page for each climbing problem, it is necessary to understand how to use React Router to define new routes and create new pages. Research on how to use React Router to create new pages in a React application. This includes understanding how to define routes, how to use the `Route` and `Link` components, and how to pass data to a new page. - [ ] **🔨 Create a new React component for the problem page** Create a new React component for the problem page. This component should display detailed information about a climbing problem, such as its name, location, grade, rating, and image. The data for the problem should be passed to the component as props. - [ ] **🔨 Define a route for the problem page** Define a route for the problem page using React Router. The route should include a unique identifier for the problem, such as its index in the list of routes or a unique ID from the data. This identifier will be used to retrieve the relevant data for the problem. - [ ] **🔨 Update the list of routes to include a link to the problem page** Update the list of routes to include a link to the new page for each problem. The link should use the `Link` component from React Router and the path should match the route defined for the problem page. - [ ] **🔨 Pass the relevant data to the problem page** Pass the relevant data for each problem to the problem page. This can be done by retrieving the data for the problem using the unique identifier in the route, and then passing this data to the problem page component as props.