From 591861117a0f434cce0833879f78974836ac1cdf Mon Sep 17 00:00:00 2001 From: Minsoo Kim <57122180+minsoo-web@users.noreply.github.com> Date: Mon, 16 Sep 2024 23:17:14 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20nextjs=20=5F=5FPRIVATE=5FNEXTJS=5FINTERN?= =?UTF-8?q?ALS=5FTREE=20=EB=88=84=EB=9D=BD=20=EB=AC=B8=EC=A0=9C=EB=A5=BC?= =?UTF-8?q?=20=ED=95=B4=EA=B2=B0=ED=95=98=EA=B3=A0,=20=EB=B2=84=EC=A0=84?= =?UTF-8?q?=EC=97=85=EC=9C=BC=EB=A1=9C=20=EC=9D=B8=ED=95=9C=20wiki=20?= =?UTF-8?q?=EB=9F=B0=ED=83=80=EC=9E=84=20=EC=97=90=EB=9F=AC=EB=A5=BC=20?= =?UTF-8?q?=ED=95=B4=EA=B2=B0=ED=95=A9=EB=8B=88=EB=8B=A4=20(#46)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: nextjs __PRIVATE_NEXTJS_INTERNALS_TREE 누락 문제 (#45) * fix: Add safeguard for undefined __PRIVATE_NEXTJS_INTERNALS_TREE in history state (Safari bugfix) * chore: nextjs version * fix: useSearchParams use client * chore: 불필요한 use client 삭제 (#47) * fix: Add safeguard for undefined __PRIVATE_NEXTJS_INTERNALS_TREE in history state (Safari bugfix) * chore: nextjs version * fix: useSearchParams use client * wiki 코드 개선 * chore: 불필요한 use client 삭제 --------- Co-authored-by: Chung-il Jung --------- Co-authored-by: Chung-il --- apps/home/next-env.d.ts | 2 +- apps/home/package.json | 2 +- .../wiki/app/_shared/components/Docs/Docs.tsx | 11 -- .../wiki/app/_shared/components/Docs/index.ts | 1 - .../app/_shared/components/Readme/index.tsx | 1 - .../_shared/components/SideNav/SideNav.tsx | 7 +- .../Readme.tsx => WikiMDX/WikiMDX.tsx} | 2 +- .../app/_shared/components/WikiMDX/index.ts | 1 + apps/wiki/app/_shared/components/index.ts | 3 +- apps/wiki/app/layout.tsx | 3 +- apps/wiki/app/page.tsx | 14 ++- apps/wiki/next-env.d.ts | 2 +- apps/wiki/package.json | 2 +- pnpm-lock.yaml | 115 ++++++++++-------- web/next-env.d.ts | 2 +- web/package.json | 2 +- 16 files changed, 86 insertions(+), 84 deletions(-) delete mode 100644 apps/wiki/app/_shared/components/Docs/Docs.tsx delete mode 100644 apps/wiki/app/_shared/components/Docs/index.ts delete mode 100644 apps/wiki/app/_shared/components/Readme/index.tsx rename apps/wiki/app/_shared/components/{Readme/Readme.tsx => WikiMDX/WikiMDX.tsx} (75%) create mode 100644 apps/wiki/app/_shared/components/WikiMDX/index.ts diff --git a/apps/home/next-env.d.ts b/apps/home/next-env.d.ts index 4f11a03..40c3d68 100644 --- a/apps/home/next-env.d.ts +++ b/apps/home/next-env.d.ts @@ -2,4 +2,4 @@ /// // NOTE: This file should not be edited -// see https://nextjs.org/docs/basic-features/typescript for more information. +// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information. diff --git a/apps/home/package.json b/apps/home/package.json index 5ed9918..bb464fb 100644 --- a/apps/home/package.json +++ b/apps/home/package.json @@ -19,7 +19,7 @@ "@next/mdx": "^14.2.5", "dayjs": "^1.11.11", "framer-motion": "^11.2.4", - "next": "^14.1.1", + "next": "^14.2.11", "next-mdx-remote": "^5.0.0", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/apps/wiki/app/_shared/components/Docs/Docs.tsx b/apps/wiki/app/_shared/components/Docs/Docs.tsx deleted file mode 100644 index cd7b151..0000000 --- a/apps/wiki/app/_shared/components/Docs/Docs.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import { Readme } from '@/_shared' - -const WIKI_URI = 'https://raw.githubusercontent.com/wiki/hamsurang/origin' -const ENCODED_DASH = '%E2%80%90' - -export const Docs = async ({ id }: { id: string }) => { - const res = await fetch(`${WIKI_URI}/${id.replace(/-/g, ENCODED_DASH)}.md`) - const wiki = await res.text() - - return -} diff --git a/apps/wiki/app/_shared/components/Docs/index.ts b/apps/wiki/app/_shared/components/Docs/index.ts deleted file mode 100644 index 22327ad..0000000 --- a/apps/wiki/app/_shared/components/Docs/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './Docs' diff --git a/apps/wiki/app/_shared/components/Readme/index.tsx b/apps/wiki/app/_shared/components/Readme/index.tsx deleted file mode 100644 index 3683da5..0000000 --- a/apps/wiki/app/_shared/components/Readme/index.tsx +++ /dev/null @@ -1 +0,0 @@ -export * from './Readme' diff --git a/apps/wiki/app/_shared/components/SideNav/SideNav.tsx b/apps/wiki/app/_shared/components/SideNav/SideNav.tsx index 1288411..0c79740 100644 --- a/apps/wiki/app/_shared/components/SideNav/SideNav.tsx +++ b/apps/wiki/app/_shared/components/SideNav/SideNav.tsx @@ -1,16 +1,13 @@ import type { NAV_ITEMS } from '@/_shared/constants' import { cn } from '@hamsurang/ui' import Link from 'next/link' -import { useSearchParams } from 'next/navigation' export interface SideNavProps { items: typeof NAV_ITEMS + docsId: string | null } -export const SideNav = ({ items }: SideNavProps) => { - const { get } = useSearchParams() - const docsId = get('id') - +export const SideNav = ({ docsId, items }: SideNavProps) => { return (