From 9bcc750005f8e932a3bb810dcc93f62839bb8c8c Mon Sep 17 00:00:00 2001 From: quentingrchr Date: Fri, 14 Jun 2024 15:09:03 +0200 Subject: [PATCH 1/2] add 'development mode' styling --- src/components/layout/Logo.tsx | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/components/layout/Logo.tsx b/src/components/layout/Logo.tsx index fa1bad8..6fd1428 100644 --- a/src/components/layout/Logo.tsx +++ b/src/components/layout/Logo.tsx @@ -4,10 +4,22 @@ import BrandIcon from './BrandIcon'; const Logo = (props: { className?: string; isWhite?: boolean }) => { return ( - - + + + digest.club From 748ca832a133779a3f233654e1ec291282e50cd5 Mon Sep 17 00:00:00 2001 From: quentingrchr Date: Fri, 14 Jun 2024 15:38:20 +0200 Subject: [PATCH 2/2] fix tag search params --- src/app/(app)/(routes)/tags/[slug]/page.tsx | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/app/(app)/(routes)/tags/[slug]/page.tsx b/src/app/(app)/(routes)/tags/[slug]/page.tsx index cbae4b6..f840526 100644 --- a/src/app/(app)/(routes)/tags/[slug]/page.tsx +++ b/src/app/(app)/(routes)/tags/[slug]/page.tsx @@ -1,34 +1,35 @@ -import Tag from '@/components/Tag'; +import ActiveTeams from '@/components/ActiveTeams'; +import CustomLink from '@/components/Link'; +import PopularTags from '@/components/PopularTags'; import Pagination from '@/components/list/Pagination'; import PublicDigestListItem from '@/components/teams/PublicDigestListItem'; -import TeamAvatar from '@/components/teams/TeamAvatar'; import { getDiscoverDigests } from '@/services/database/digest'; import { getPopularTags, getTagBySlug } from '@/services/database/tag'; import { getRecentTeams } from '@/services/database/team'; -import { Button } from '@tremor/react'; -import Link from 'next/link'; -import CustomLink from '@/components/Link'; import { notFound } from 'next/navigation'; -import PopularTags from '@/components/PopularTags'; -import ActiveTeams from '@/components/ActiveTeams'; export const dynamic = 'force-dynamic'; +const PER_PAGE = 10; + const TagsPage = async ({ params, + searchParams, }: { params: { slug: string; }; + searchParams?: { [key: string]: string | undefined }; }) => { const { slug } = params; - const page = 1; + const page = Number(searchParams?.page || 1); + const tag = await getTagBySlug(slug); if (!tag) return notFound(); const recentTeams = await getRecentTeams(); const { digests, digestsCount } = await getDiscoverDigests({ page, - perPage: 20, + perPage: PER_PAGE, tagId: tag.id, }); const popularTags = await getPopularTags();