Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions .github/workflows/review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- run: pnpm install
- run: pnpm run lint
- uses: reviewdog/action-eslint@v1

- name: Install pnpm
run: npm install -g pnpm

- name: Install dependencies
run: pnpm install

- name: Run lint
run: pnpm --filter @repo/ui run lint

- name: Run reviewdog for ESLint
uses: reviewdog/action-eslint@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
73 changes: 70 additions & 3 deletions apps/web/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,78 @@
import { Suspense } from "react";
"use client";
import { MainHomeLayout } from "@repo/web-ui/layout";
import React, { useCallback, Suspense } from "react";
import { useSearchParams, useRouter } from "next/navigation";
import "./page.module.css";
import TabContents from "./tabs";
import QuizMarkdownEditor from "../components/markdown-editor";
import ChatgptEditor from "../components/chatgpt-editor";
import XEditor from "../components/x-editor";
import NotebookEditor from "../components/notebook-editor";
import GradientEditor from "../components/gradient-editor";
import ProfileEditor from "../components/profile-editor";

import { CardSizeProvider } from "@repo/ui/context/CardSizeContext";

const tabs = [
{
key: "markdown",
label: "Markdown Card",
},
{
key: "chatgpt",
label: "ChatGPT Card",
},
{
key: "gradient",
label: "Gradient Card",
},
{
key: "x",
label: "X Card",
},
{
key: "notebook",
label: "Notebook Card",
},
{
key: "profile",
label: "Profile Card",
},


];

function HomeContent() {
const searchParams = useSearchParams();
const router = useRouter();

const currentTab = searchParams.get("t") || "markdown";

const setTab = useCallback((newTab: string) => {
const params = new URLSearchParams(searchParams.toString());
params.set("t", newTab);
router.push(`?${params.toString()}`);
}, [searchParams, router]);

return (
<MainHomeLayout tab={currentTab} tabs={tabs} setTab={setTab}>
<CardSizeProvider>
{currentTab === "markdown" ? <QuizMarkdownEditor /> : null}
{currentTab === "chatgpt" ? <ChatgptEditor /> : null}
{currentTab === "gradient" ? <GradientEditor /> : null}
{currentTab === "x" ? <XEditor /> : null}
{currentTab === "notebook" ? <NotebookEditor /> : null}
{currentTab === "profile" ? <ProfileEditor /> : null}

</CardSizeProvider>
</MainHomeLayout>
);
}

export default function Home() {
return (
<Suspense fallback={<div>Loading...</div>}>
Copy link

Copilot AI Aug 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the coding guidelines, new components should have tabs added to apps/web/app/page.tsx. While tabs were added, the structure doesn't clearly follow the required pattern of having separate tabs for each new component (Profile card, Notebook card, and X card).

Copilot uses AI. Check for mistakes.
<TabContents />
<HomeContent />
</Suspense>
);
}

2 changes: 1 addition & 1 deletion apps/web/components/gradient-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { SliderBox, DrawInput, CheckBox } from "./common";

const STORAGE_KEY = "gradient-editor-v1";

const cardBgColor = "bg-white";
const cardBgColor = "bg-yellow-200";
const textColor = "text-gray-900";
const borderColor = "border-gray-300";

Expand Down
Loading
Loading