Closed lalitdotdev closed 2 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
devcastle | ❌ Failed (Inspect) | Aug 29, 2024 7:49pm |
The changes introduce enhancements to the Prisma schema, adding new models and fields to improve user interactions, such as bookmarks, notifications, and media attachments. New API endpoints for managing bookmarks and retrieving user-specific data are implemented. Additionally, React components are created or modified to support these features, including infinite scrolling for bookmarks and a bookmarking button for posts, ensuring a cohesive user experience across the application.
Files | Change Summary |
---|---|
prisma/schema.prisma |
Updated User , Media , Follow , Notification models; added enums for user roles and notification types. |
src/app/api/posts/[postId]/bookmark/route.ts |
Implemented RESTful API for managing bookmarks with GET , POST , and DELETE methods. |
src/app/api/posts/bookmarked/route.ts |
Created API endpoint for retrieving a user's bookmarked posts with pagination. |
src/app/bookmarks/_components/BookMarks.tsx |
Added a component for displaying bookmarked posts with infinite scrolling. |
src/app/bookmarks/page.tsx |
Introduced a page layout for bookmarks with tabbed navigation. |
src/components/Feed/GeneralFeed.tsx |
Modified database query to include bookmarks in post retrieval. |
src/components/InfiniteScrollContainer.tsx |
Created a reusable component for infinite scrolling functionality. |
src/components/Posts/BookMarkBtn.tsx |
Added a button component for bookmarking posts, managing server state with React Query. |
src/components/Posts/Post.tsx |
Enhanced Post component to include bookmarking functionality and updated props interface. |
src/components/Posts/PostFeed.tsx |
Adjusted spacing in the post feed layout. |
src/types/db.d.ts |
Updated ExtendedPost type to include bookmarks. |
src/app/feed/actions.ts |
Introduced a server-side function for retrieving community data. |
src/app/layout.tsx |
Modified conditional rendering for the Sidebar based on user session. |
tailwind.config.js |
Added new color definitions to the Tailwind CSS configuration. |
sequenceDiagram
participant User
participant BookmarkAPI
participant Database
participant PostComponent
User->>BookmarkAPI: GET /api/posts/bookmarked
BookmarkAPI->>Database: Query bookmarks for user
Database-->>BookmarkAPI: Return bookmarks
BookmarkAPI-->>User: Return bookmarked posts
User->>PostComponent: Click Bookmark Button
PostComponent->>BookmarkAPI: POST/DELETE bookmark
BookmarkAPI->>Database: Update bookmark status
Database-->>BookmarkAPI: Confirm update
BookmarkAPI-->>PostComponent: Return updated status
🐇 In the meadow where the bunnies play,
New bookmarks hop in, brightening the day!
With posts to save and friends to greet,
Our little world is now more sweet!
So let us cheer, with a joyful bound,
For changes that make our hearts resound! 🌼
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
Bug Fixes
Documentation