From 890091331c374f73970a0bade91adf9747a46779 Mon Sep 17 00:00:00 2001 From: jweboy Date: Mon, 8 Apr 2024 14:54:18 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E7=95=8C?= =?UTF-8?q?=E9=9D=A2UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/auto_merge.yml | 29 ++++++++++++++++++++++++++ app/product/@content/page.tsx | 17 ++++++++++----- app/product/components/SearchInput.tsx | 14 ++++++++++--- app/product/layout.tsx | 12 ++++++----- package.json | 2 +- 5 files changed, 60 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/auto_merge.yml diff --git a/.github/workflows/auto_merge.yml b/.github/workflows/auto_merge.yml new file mode 100644 index 0000000..f909e17 --- /dev/null +++ b/.github/workflows/auto_merge.yml @@ -0,0 +1,29 @@ +name: automerge +on: + pull_request: + types: + - labeled + - unlabeled + - synchronize + - opened + - edited + - ready_for_review + - reopened + - unlocked + pull_request_review: + types: + - submitted + check_suite: + types: + - completed + status: {} +jobs: + automerge: + runs-on: ubuntu-latest + steps: + - id: automerge + name: automerge + uses: "pascalgn/automerge-action@v0.15.5" + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + MERGE_LABELS: "" \ No newline at end of file diff --git a/app/product/@content/page.tsx b/app/product/@content/page.tsx index f850081..1bca66a 100644 --- a/app/product/@content/page.tsx +++ b/app/product/@content/page.tsx @@ -11,15 +11,14 @@ import dayjs from "dayjs"; import Link from "next/link"; import React from "react"; -const PlatformContent = async ({ searchParams }: Props) => { - const data = await request("/platform", { searchParams }); - console.log(searchParams); +const Content = async ({ searchParams }: Props) => { + const data = await request("/platform", { searchParams, cache: "no-cache" }); return ( -
+
{Array.isArray(data) && data.map((item) => ( - + {item.name} @@ -51,4 +50,12 @@ const PlatformContent = async ({ searchParams }: Props) => { ); }; +const PlatformContent = (props: Props) => { + return ( + + + + ); +}; + export default PlatformContent; diff --git a/app/product/components/SearchInput.tsx b/app/product/components/SearchInput.tsx index 6b7cdac..1325929 100644 --- a/app/product/components/SearchInput.tsx +++ b/app/product/components/SearchInput.tsx @@ -1,12 +1,12 @@ "use client"; import { Input } from "@/components/ui/input"; -import { Search } from "lucide-react"; +import { Search as SearchIcon } from "lucide-react"; import { useSearchParams } from "next/navigation"; import QueryString from "qs"; import React from "react"; -const SearchInput = () => { +const Search = () => { const searchParams = useSearchParams(); const keyword = searchParams.get("keyword"); const [value, setValue] = React.useState(keyword == null ? "" : keyword); @@ -29,7 +29,7 @@ const SearchInput = () => { return (
- + { ); }; +const SearchInput = () => { + return ( + + + + ); +}; + export default SearchInput; diff --git a/app/product/layout.tsx b/app/product/layout.tsx index 0d966c6..0172fbb 100644 --- a/app/product/layout.tsx +++ b/app/product/layout.tsx @@ -4,8 +4,10 @@ import { ModeToggle } from "@/components/ModeToggle"; import { Input } from "@/components/ui/input"; import { useForm } from "react-hook-form"; import SearchInput from "./components/SearchInput"; +import { useParams, useSearchParams } from "next/navigation"; -function Dashboard({ content }: { content: React.ReactElement }) { +function Dashboard(props: { content: React.ReactElement } & Props) { + const { content, searchParams } = props; return (
@@ -19,21 +21,21 @@ function Dashboard({ content }: { content: React.ReactElement }) { Database - UI + Design
- + {/* */}
diff --git a/package.json b/package.json index af37d62..02e8575 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "scripts": { - "dev": "next dev --turbo", + "dev": "next dev", "build": "next build", "start": "next start", "lint": "next lint" From 335e8f8055abf89752f5ea71f8f6983563b7920c Mon Sep 17 00:00:00 2001 From: jweboy Date: Mon, 8 Apr 2024 14:57:13 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0ts=E5=A3=B0?= =?UTF-8?q?=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/product/layout.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/product/layout.tsx b/app/product/layout.tsx index 0172fbb..e9e4115 100644 --- a/app/product/layout.tsx +++ b/app/product/layout.tsx @@ -6,8 +6,8 @@ import { useForm } from "react-hook-form"; import SearchInput from "./components/SearchInput"; import { useParams, useSearchParams } from "next/navigation"; -function Dashboard(props: { content: React.ReactElement } & Props) { - const { content, searchParams } = props; +function Dashboard(props: { content: React.ReactElement }) { + const { content } = props; return (