diff --git a/app/projects/[slug]/[[...tab]]/page.tsx b/app/projects/[slug]/[[...tab]]/page.tsx index 39c2403..4be8247 100644 --- a/app/projects/[slug]/[[...tab]]/page.tsx +++ b/app/projects/[slug]/[[...tab]]/page.tsx @@ -1,5 +1,7 @@ import ProjectAnalytics from "@/components/projects/project-analytics"; import { PROJECT_TABS } from "@/components/projects/project-constants"; +import ProjectContentWrapper from "@/components/projects/project-content-wrapper"; +import ProjectReadme from "@/components/projects/project-readme"; import ProjectTeam from "@/components/projects/project-team"; import { getProject } from "@/lib/actions/get-project"; import { notFound } from "next/navigation"; @@ -30,7 +32,12 @@ export default async function Project({ } if (!tab) { - return ; + return ( +
+ + {project.readme && } +
+ ); } if (tab[0] === "team") { @@ -39,13 +46,15 @@ export default async function Project({ if (tab[0] === "contributors") { return ( - - - + + + + + ); } } diff --git a/app/projects/[slug]/layout.tsx b/app/projects/[slug]/layout.tsx index 6a07dfb..3fcbca9 100644 --- a/app/projects/[slug]/layout.tsx +++ b/app/projects/[slug]/layout.tsx @@ -4,7 +4,6 @@ import ProjectLayoutTabs from "@/components/projects/project-layout-tabs"; import ProjectProvider from "@/components/projects/project-provider"; import { buttonLinkVariants } from "@/components/ui/button-link"; import { getProject } from "@/lib/actions/get-project"; -import { getRepo } from "@/lib/github"; import prisma from "@/lib/prisma"; import { constructMetadata } from "@/lib/utils"; import { cn, nFormatter } from "@dub/utils"; @@ -57,19 +56,6 @@ export default async function ProjectLayout({ notFound(); } - const { stars } = await getRepo(project.githubLink.url); - - if (stars !== project.stars) { - await prisma.project.update({ - where: { - slug, - }, - data: { - stars, - }, - }); - } - return (
-

{nFormatter(stars, { full: true })}

+

+ {nFormatter(project.stars, { full: true })} +

{project.websiteLink && ( -
- {children} -
+ {children} ); } diff --git a/components/projects/project-analytics-client.tsx b/components/projects/project-analytics-client.tsx index 711b2cb..8bb6161 100644 --- a/components/projects/project-analytics-client.tsx +++ b/components/projects/project-analytics-client.tsx @@ -32,7 +32,10 @@ export default function ProjectAnalyticsClient({ return (
-
+
+

+ Real-time click analytics +