Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create TagPage #531

Closed
5 tasks done
TheRealLowyer opened this issue Dec 16, 2024 · 0 comments · Fixed by #521
Closed
5 tasks done

Create TagPage #531

TheRealLowyer opened this issue Dec 16, 2024 · 0 comments · Fixed by #521
Assignees
Labels
Action Item A specific task requiring attention Frontend Priority: High Requires taking action ASAP

Comments

@TheRealLowyer
Copy link
Contributor

TheRealLowyer commented Dec 16, 2024

ℹ️ Description

The TagPage component has been implemented to enhance the user experience by providing a centralized page for posts associated with specific tags. This new feature ensures dynamic navigation, seamless integration with the existing Feed component, and improved styling to showcase posts based on tags.

🎯 Tasks

TagPage Component

  • Implement the TagPage component to:
    • Fetch posts associated with a specific tag from the backend.
    • Display posts using the existing Feed component.
    • Include a styled header showcasing the tag name.
    • Handle loading and error states gracefully.

Service Integration

  • Create the getPostsByTag service function to:
    • Fetch posts using the endpoint GET /api/post/get-posts-by-tag?tag=@TAG.
    • Pass the Authorization token for authenticated users.
    • Handle unauthenticated requests by sending an empty token.

Routing

  • Add a dynamic route for TagPage:
    • Configure <Route path="/tag/:tag" element={<TagPage />} /> in the router.
    • Ensure the TagPage dynamically renders based on the tag parameter.

Dynamic Links

  • Update components (e.g., PostHeader) to link tags dynamically:
    • Use <Link to={/tag/${encodeURIComponent(tag)}}>{tag}</Link> for navigation.
    • Ensure special characters in tags are properly encoded with encodeURIComponent.

Styling Enhancements

  • Design a visually appealing and responsive header for the TagPage:
    • Highlight the tag name with a styled badge.
    • Add modern UI elements to improve user interaction and overall aesthetics.
@TheRealLowyer TheRealLowyer added Priority: High Requires taking action ASAP Action Item A specific task requiring attention Frontend labels Dec 16, 2024
@TheRealLowyer TheRealLowyer self-assigned this Dec 16, 2024
@TheRealLowyer TheRealLowyer linked a pull request Dec 16, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Action Item A specific task requiring attention Frontend Priority: High Requires taking action ASAP
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant