diff --git a/apps/marketing/src/app/(marketing)/open/gh-forks.tsx b/apps/marketing/src/app/(marketing)/open/gh-forks.tsx new file mode 100644 index 000000000..c2776ea91 --- /dev/null +++ b/apps/marketing/src/app/(marketing)/open/gh-forks.tsx @@ -0,0 +1,44 @@ +'use client'; + +import { HTMLAttributes } from 'react'; + +import { Bar, BarChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts'; + +import { formatMonth } from '@documenso/lib/client-only/format-month'; +import { cn } from '@documenso/ui/lib/utils'; + +import { StargazersType } from './page'; + +export type GithubForksProps = HTMLAttributes & { data: StargazersType }; + +export const GithubForks = ({ className, data, ...props }: GithubForksProps) => { + const formattedData = Object.keys(data) + .map((key) => ({ + month: formatMonth(key), + stars: data[key].forks, + })) + .reverse(); + + return ( +
+

Github: Forks

+ +
+ + + + + [Number(value), 'Stars']} + cursor={{ fill: 'hsl(var(--primary) / 10%)' }} + /> + + + +
+
+ ); +}; diff --git a/apps/marketing/src/app/(marketing)/open/gh-merged-prs.tsx b/apps/marketing/src/app/(marketing)/open/gh-merged-prs.tsx new file mode 100644 index 000000000..2c9cc2ef0 --- /dev/null +++ b/apps/marketing/src/app/(marketing)/open/gh-merged-prs.tsx @@ -0,0 +1,44 @@ +'use client'; + +import { HTMLAttributes } from 'react'; + +import { Bar, BarChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts'; + +import { formatMonth } from '@documenso/lib/client-only/format-month'; +import { cn } from '@documenso/ui/lib/utils'; + +import { StargazersType } from './page'; + +export type GithubMergedPrsProps = HTMLAttributes & { data: StargazersType }; + +export const GithubMergedPrs = ({ className, data, ...props }: GithubMergedPrsProps) => { + const formattedData = Object.keys(data) + .map((key) => ({ + month: formatMonth(key), + stars: data[key].mergedPRs, + })) + .reverse(); + + return ( +
+

Github: Merged PRs

+ +
+ + + + + [Number(value), 'Stars']} + cursor={{ fill: 'hsl(var(--primary) / 10%)' }} + /> + + + +
+
+ ); +}; diff --git a/apps/marketing/src/app/(marketing)/open/gh-open-issues.tsx b/apps/marketing/src/app/(marketing)/open/gh-open-issues.tsx new file mode 100644 index 000000000..ce0390b1d --- /dev/null +++ b/apps/marketing/src/app/(marketing)/open/gh-open-issues.tsx @@ -0,0 +1,44 @@ +'use client'; + +import { HTMLAttributes } from 'react'; + +import { Bar, BarChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts'; + +import { formatMonth } from '@documenso/lib/client-only/format-month'; +import { cn } from '@documenso/ui/lib/utils'; + +import { StargazersType } from './page'; + +export type GithubOpenIssuesProps = HTMLAttributes & { data: StargazersType }; + +export const GithubOpenIssues = ({ className, data, ...props }: GithubOpenIssuesProps) => { + const formattedData = Object.keys(data) + .map((key) => ({ + month: formatMonth(key), + stars: data[key].openIssues, + })) + .reverse(); + + return ( +
+

Github: Open Issues

+ +
+ + + + + [Number(value), 'Stars']} + cursor={{ fill: 'hsl(var(--primary) / 10%)' }} + /> + + + +
+
+ ); +}; diff --git a/apps/marketing/src/app/(marketing)/open/gh-stars.tsx b/apps/marketing/src/app/(marketing)/open/gh-stars.tsx index 1eff5bd07..8d696a358 100644 --- a/apps/marketing/src/app/(marketing)/open/gh-stars.tsx +++ b/apps/marketing/src/app/(marketing)/open/gh-stars.tsx @@ -21,7 +21,7 @@ export const GithubStars = ({ className, data, ...props }: GithubStarsProps) => return (
-

Github Monthly Stars

+

Github: Stars

diff --git a/apps/marketing/src/app/(marketing)/open/page.tsx b/apps/marketing/src/app/(marketing)/open/page.tsx index d31ae067b..202b58f41 100644 --- a/apps/marketing/src/app/(marketing)/open/page.tsx +++ b/apps/marketing/src/app/(marketing)/open/page.tsx @@ -5,6 +5,9 @@ import { SalaryBands } from '~/app/(marketing)/open/salary-bands'; import { CapTable } from './cap-table'; import { FundingRaised } from './funding-raised'; +import { GithubForks } from './gh-forks'; +import { GithubMergedPrs } from './gh-merged-prs'; +import { GithubOpenIssues } from './gh-open-issues'; import { GithubStars } from './gh-stars'; import { TeamMembers } from './team-members'; @@ -108,6 +111,9 @@ export default async function OpenPage() { + + +

Where's the rest?