Skip to content

Commit cbd0ca4

Browse files
authored
refactor(website): improve community page (#1022)
1 parent 4809ed1 commit cbd0ca4

File tree

16 files changed

+113
-264
lines changed

16 files changed

+113
-264
lines changed

apps/website/app/(home)/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ESLintReact } from "#/components/eslint-react";
1+
import { ESLintReact } from "#/components/ESLintReact";
22

33
import { Card, Cards } from "fumadocs-ui/components/card";
44

apps/website/app/layout.config.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { BaseLayoutProps } from "fumadocs-ui/layouts/shared";
22
import type { StaticImageData } from "next/image";
33
import logo from "#/assets/logo.svg";
44

5-
import { Image } from "#/components/ui/image";
5+
import { Image } from "#/components/ui/Image";
66
import React from "react";
77

88
/**

apps/website/components/eslint-react.tsx renamed to apps/website/components/ESLintReact.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type { StaticImageData } from "next/image";
22
import logo from "#/assets/logo.svg";
33

4-
import React from "react";
4+
import { Image } from "#/components/ui/Image";
55

6-
import { Image } from "./ui/image";
6+
import React from "react";
77

88
export function ESLintReact() {
99
return (
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { cn } from "#/lib/cn";
2+
import { GithubInfo } from "fumadocs-ui/components/github-info";
3+
4+
export function GitHubRepo({ className, token, ...rest }: Parameters<typeof GithubInfo>[0]) {
5+
return (
6+
<GithubInfo
7+
className={cn("rounded-lg", "bg-gray-100", "dark:bg-gray-800", className)}
8+
token={token ?? process.env["GITHUB_TOKEN"] ?? ""}
9+
{...rest}
10+
/>
11+
);
12+
}
File renamed without changes.

apps/website/components/widgets/community-presets.tsx

Lines changed: 0 additions & 34 deletions
This file was deleted.

apps/website/content/docs/community.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ title: Community
33
description: "Discover the growing community around ESLint React"
44
---
55

6-
import { BskyPost } from "../../components/widgets/bsky-post";
7-
import { CommunityPresets } from "../../components/widgets/community-presets";
6+
import { BskyPost } from "../../components/BskyPost";
7+
import { CommunityShowcases, CommunityPresets } from "./community";
88

99
## OSS Projects Using ESLint React
1010

11-
[![used-by](/used_by.png)](https://github.com/Rel1cx/eslint-react/blob/main/assets/NOTABLE_PROJECTS_USING_ESLINT_REACT)
11+
<CommunityShowcases />
1212

1313
<small>
1414

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
import { GitHubRepo } from "#/components/GitHubRepo";
2+
3+
const repos = [
4+
{ owner: "DimensionDev", repo: "Maskbook" },
5+
{ owner: "electric-sql", repo: "electric" },
6+
{ owner: "electric-sql", repo: "pglite" },
7+
{ owner: "ensdomains", repo: "thorin" },
8+
{ owner: "flirtual", repo: "flirtual" },
9+
{ owner: "hashintel", repo: "hash" },
10+
{ owner: "npmgraph", repo: "npmgraph" },
11+
{ owner: "offlegacy", repo: "event-tracker" },
12+
{ owner: "onejs", repo: "one" },
13+
{ owner: "prettier", repo: "prettier" },
14+
{ owner: "react-navigation", repo: "react-navigation" },
15+
{ owner: "refined-github", repo: "refined-github" },
16+
{ owner: "RSSNext", repo: "Follow" },
17+
{ owner: "TanStack", repo: "form" },
18+
{ owner: "TanStack", repo: "query" },
19+
{ owner: "TanStack", repo: "router" },
20+
{ owner: "TanStack", repo: "store" },
21+
{ owner: "toss", repo: "suspensive" },
22+
{ owner: "upleveled", repo: "eslint-config-upleveled" },
23+
{ owner: "XYOracleNetwork", repo: "sdk-xyo-react-js" },
24+
];
25+
26+
const presets = [
27+
{ owner: "AndreaPontrandolfo", repo: "sheriff" },
28+
{ owner: "antfu", repo: "eslint-config" },
29+
{ owner: "RebeccaStevens", repo: "eslint-config-rebeccastevens" },
30+
{ owner: "SukkaW", repo: "eslint-config-sukka" },
31+
];
32+
33+
export function CommunityShowcases() {
34+
return (
35+
<div className="not-prose grid grid-cols-1 gap-4 md:grid-cols-2">
36+
{repos.map(({ owner, repo }) => (
37+
<GitHubRepo
38+
className="shadow-sm"
39+
key={`${owner}/${repo}`}
40+
owner={owner}
41+
repo={repo}
42+
/>
43+
))}
44+
</div>
45+
);
46+
}
47+
48+
export function CommunityPresets() {
49+
return (
50+
<div className="not-prose grid grid-cols-1 gap-4 md:grid-cols-2">
51+
{presets.map(({ owner, repo }) => (
52+
<GitHubRepo
53+
className="shadow-sm"
54+
key={`${owner}/${repo}`}
55+
owner={owner}
56+
repo={repo}
57+
/>
58+
))}
59+
</div>
60+
);
61+
}

apps/website/content/docs/configurations.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable perfectionist/sort-objects */
2-
import { CodeBlock } from "#/components/code-block";
2+
import { CodeBlock } from "#/components/ui/CodeBlock";
33
import dedent from "dedent";
44
import { TypeTable } from "fumadocs-ui/components/type-table";
55

0 commit comments

Comments
 (0)