From 41b2496b7191200eb68a870e423a18025353e6fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=8B=9C=EC=9A=B4?= Date: Sun, 18 Aug 2024 16:25:21 +0900 Subject: [PATCH] =?UTF-8?q?inv-126=20:=20=20=ED=83=80=EC=9D=B4=ED=8B=80,?= =?UTF-8?q?=20=EB=82=B4=EC=9A=A9=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8=20?= =?UTF-8?q?=EC=BF=BC=EB=A6=AC=20=20(#64)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: using update request api * feat: title update use debounce * chore: 불필요한 console.log 제거 * refactor: Config 명세 변경 적용 * feat: 삭제 api 연결 * refactor: title update mutation * refactor: query auth * fix: editor.data typo * feat: 저장 토스트 문구 수정 * fix: query typo --------- Co-authored-by: bepyan --- src/app/(main)/dashboard/page.tsx | 4 +- src/app/(main)/i/[subdomain]/edit/page.tsx | 57 ++++++---------------- src/app/(main)/i/layout.tsx | 24 +++++++++ src/components/editor/navigation.tsx | 28 ++++++++--- src/components/editor/title-input.tsx | 20 +++++--- src/lib/db/schema/invitations.query.ts | 30 ++++++++---- src/lib/db/schema/invitations.ts | 3 +- 7 files changed, 98 insertions(+), 68 deletions(-) create mode 100644 src/app/(main)/i/layout.tsx diff --git a/src/app/(main)/dashboard/page.tsx b/src/app/(main)/dashboard/page.tsx index cb89e5ad..d3582524 100644 --- a/src/app/(main)/dashboard/page.tsx +++ b/src/app/(main)/dashboard/page.tsx @@ -25,7 +25,7 @@ export default async function Page() { if (!auth.user) { return redirect("/sign-in"); } - const invitations = await getInvitationsByUserId(auth.user.id); + const invitations = await getInvitationsByUserId(); return (
@@ -55,7 +55,7 @@ export default async function Page() { {invitations.map((invitation) => (
  • diff --git a/src/app/(main)/i/[subdomain]/edit/page.tsx b/src/app/(main)/i/[subdomain]/edit/page.tsx index f24e11e9..f008dbfd 100644 --- a/src/app/(main)/i/[subdomain]/edit/page.tsx +++ b/src/app/(main)/i/[subdomain]/edit/page.tsx @@ -1,49 +1,22 @@ import Editor from "~/components/editor"; +import { getInvitationByEventUrl } from "~/lib/db/schema/invitations.query"; + +export default async function Page({ + params, +}: { + params: { subdomain: string }; +}) { + const invitation = await getInvitationByEventUrl(params.subdomain); -export default async function Page() { return ( ); } diff --git a/src/app/(main)/i/layout.tsx b/src/app/(main)/i/layout.tsx new file mode 100644 index 00000000..fcc587f8 --- /dev/null +++ b/src/app/(main)/i/layout.tsx @@ -0,0 +1,24 @@ +import Script from "next/script"; +import { env } from "~/lib/env"; + +export default function KakaoMapScriptLayout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> +