AthletiFi / athletifi-website

Official website for AthletiFi
https://www.athleti.fi
1 stars 5 forks source link

Implement Upcoming Matches component #226

Closed qisforq closed 1 month ago

qisforq commented 2 months ago

Objective:

Develop the "Upcoming Matches" component based on the design specified in #216, including weather forecast, notification functionality, and a "This week!" banner for matches happening within the current week.

Sub-tasks:

  1. Review the design mockup and requirements.

    • [ ] Study the design mockup provided in #216 to understand the visual layout and elements of the "Upcoming Matches" component.
    • [ ] Take note of the specific requirements, such as displaying the weather forecast, notification button, and "This week!" banner.
  2. Create the basic structure of the "Upcoming Matches" component.

    • [ ] Create a new component file (e.g., src/components/dashboard/UpcomingMatches.tsx) for the "Upcoming Matches" component.
    • [ ] Set up the basic component structure, including the necessary imports and prop definitions.
    • [ ] Implement the TSX markup for the component, following the design mockup.
  3. Fetch and display the upcoming matches data.

    • [ ] Identify the API endpoint or data source for retrieving the upcoming matches data.
    • [ ] Implement the necessary API call or data fetching logic within the component or a separate service.
    • [ ] Map the retrieved data to the appropriate elements in the component
    • [ ] Handle loading states and error scenarios gracefully.
  4. Integrate the weather forecast feature.

    • [ ] Implement the API call or data fetching logic to retrieve the weather forecast for each upcoming match.
    • [ ] Display the weather forecast information alongside the respective matches in the component.
    • [ ] Provide a visually appealing and intuitive representation of the weather forecast.
  5. Implement the notification functionality.

    • [ ] Add a notification button or toggle for each upcoming match.
    • [ ] Create the necessary event handlers and state management to handle user interactions with the notification button.
    • [ ] Implement the logic to send notifications to the user when the match day arrives.
    • [ ] Ensure that the notification functionality integrates seamlessly with the existing notification system or services.
  6. Add the "This week!" banner for matches happening within the current week.

    • [ ] Determine the logic to identify matches occurring within the current week.
    • [ ] Implement the conditional rendering of the "This week!" banner based on the match's date.
    • [ ] Style the banner according to the design specifications, making it visually prominent and intuitive.