-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: create main page #20
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closed
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
The slice will be used to track and handle changes in the menu's responsiveness within the application. So, the 'toggleResponsiveMenu' action will leverage this slice to toggle the responsive menu when necessary.
…nd retweets fields
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
About the Pull Request
This pull request represents a pivotal stride towards delivering an exceptional user experience on our Twitter clone project. The focal point is the creation of a functional main page that seamlessly integrates a Side Menu, a Popular Trends Section, and a Posts Section, aligning precisely with the specifications outlined in our Figma Design Solution.
Details
Objective
The primary objective of this pull request is to establish a dynamic and visually appealing main page that not only serves as the central hub for user interactions but also showcases posts extracted from the JSONPlaceholder API. For further context, refer to issue #8 for additional details.
Changes Made
/home Route:
/home
route, setting the stage for the main page's core functionality. It's worth noting that user authentication safeguards for this page will be addressed in subsequent pull requests.Responsive SideMenu Component:
SideMenu
component, presenting users with various options and routes for seamless navigation. The actual functionality of these routes will be detailed in upcoming pull requests.Responsive PopularTrendsSection:
PopularTrendsSection
component, enriching the main page with static information. Future pull requests will delve into introducing exciting features for this section.Responsive PostsSection:
PostsSection
component that intelligently loads posts—starting with an initial 12 and incrementally fetching more until reaching a total of 100. Additionally, introduced theCreatePost
component, with its functionality slated for coverage in subsequent pull requests.Layout Component:
PopularTrendsSection
andSideMenu
seamlessly into theLayout
component, ensuring their cohesive display on the/home
route.Login and Auth Pages Enhancements:
Redux Configuration
Redux Window Width Slice:
windowWidth
slice in Redux to dynamically manage the display of the main page based on the window's width. This is crucial, especially in scenarios where Tailwind breakpoints alone fall short.ResponsiveMenu Slice:
responsiveMenu
slice in Redux, equipped with a boolean value for tracking the status of the responsive menu across the entire application. ThetoggleResponsiveMenu
function facilitates convenient opening and closing of the menu.API Endpoint: /api/posts
About this Endpoint
You can learn more about the
api/posts
endpoint in the #8 pull request.Response
The
api/posts
endpoint response has undergone enhancements to include additional data for each post. Now, in addition to the existing content, each post response includes details on likes, comments, and retweets. This data is dynamically generated for realism, with the following structure:This modification enriches the post data, providing valuable insights into user engagement with each post. The likes and retweets values are randomly generated to simulate user interactions, contributing to a more dynamic and realistic representation of the social media experience.
Configuration Changes
Tailwind Config Changes:
animate-bounce
Tailwind rule for menu options, adding a touch of interactivity.Impact
Creating a compelling UI for the main page significantly enhances the user experience in our social media application. Focusing on excellent UX ensures users have a positive and enjoyable interaction within our app.
Screenshots
Demo Layout Structure
Caption: Overview of the main page layout structure.
Live Demo Main Page Responsiveness
Caption: Demonstrating the responsiveness of the main page.
Live Demo Main Page
Caption: Live preview of the main page.