Skip to content

Commit

Permalink
[ui] Change the large bookmarks grid to have 3 cols instead of 4 and fix
Browse files Browse the repository at this point in the history
hover coloring
  • Loading branch information
MohamedBassem committed Feb 9, 2024
1 parent 7400914 commit 347aa0c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion packages/web/app/api/v1/bookmarks/[bookmarkId]/route.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { authOptions } from "@/lib/auth";
import { deleteBookmark, updateBookmark } from "@/lib/services/bookmarks";
import { ZBookmark, zUpdateBookmarksRequestSchema } from "@/lib/types/api/bookmarks";
import {
ZBookmark,
zUpdateBookmarksRequestSchema,
} from "@/lib/types/api/bookmarks";
import { Prisma } from "@remember/db";

import { getServerSession } from "next-auth";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function BookmarksGrid({
bookmarks: ZBookmark[];
}) {
return (
<div className="container grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4">
<div className="container grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-3">
{bookmarks.map((b) => renderBookmark(b))}
</div>
);
Expand Down
3 changes: 1 addition & 2 deletions packages/web/app/dashboard/bookmarks/components/LinkCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { ZBookmark } from "@/lib/types/api/bookmarks";
import Link from "next/link";
import BookmarkOptions from "./BookmarkOptions";


export default function LinkCard({ bookmark }: { bookmark: ZBookmark }) {
const link = bookmark.content;
const parsedUrl = new URL(link.url);
Expand All @@ -30,7 +29,7 @@ export default function LinkCard({ bookmark }: { bookmark: ZBookmark }) {
{bookmark.tags.map((t) => (
<Badge
variant="default"
className="bg-gray-300 text-gray-500"
className="bg-gray-300 text-gray-500 hover:text-white"
key={t.id}
>
#{t.name}
Expand Down
5 changes: 3 additions & 2 deletions packages/web/lib/types/api/bookmarks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ export const zGetBookmarksResponseSchema = z.object({
});
export type ZGetBookmarksResponse = z.infer<typeof zGetBookmarksResponseSchema>;


// PATCH /v1/bookmarks/[bookmarkId]
export const zUpdateBookmarksRequestSchema = z.object({
archived: z.boolean().optional(),
favourited: z.boolean().optional(),
});
export type ZUpdateBookmarksRequest = z.infer<typeof zUpdateBookmarksRequestSchema>;
export type ZUpdateBookmarksRequest = z.infer<
typeof zUpdateBookmarksRequestSchema
>;

0 comments on commit 347aa0c

Please sign in to comment.