Skip to content

Commit

Permalink
feat: seo description 연동
Browse files Browse the repository at this point in the history
  • Loading branch information
bepyan committed Aug 21, 2024
1 parent 6326ca3 commit f9fff3d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/components/editor/sidebar/sidebar-settings-tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ function SEOSection() {
mutationFn: async () => {
await updateInvitation({
id: editor.config.invitationId,
description: editor.config.invitationDesc,
thumbnailUrl: editor.config.invitationThumbnail,
});
},
Expand All @@ -198,7 +199,7 @@ function SEOSection() {
링크 공유시 보여지는 정보를 설정해보세요.
</p>
</div>
<div className="col-span-9">
<div className="col-span-9 space-y-1">
<ImageDropzone
disabled={isPending}
onLoadImage={async ({ url, file }) => {
Expand All @@ -217,7 +218,6 @@ function SEOSection() {
id="invitationThumbnail"
disabled={isPending}
componentPrefix={"이미지 링크"}
className="mt-1"
defaultValue={editor.config.invitationThumbnail}
onDebounceChange={(e) => {
dispatch({
Expand All @@ -228,6 +228,20 @@ function SEOSection() {
});
}}
/>
<EditorInput
id="invitationDesc"
disabled={isPending}
componentPrefix={"설명"}
defaultValue={editor.config.invitationDesc}
onDebounceChange={(e) => {
dispatch({
type: "UPDATE_CONFIG",
payload: {
invitationDesc: e.target.value,
},
});
}}
/>
</div>
<div className="col-span-9">
<div className="select-none bg-[#BACEE0] p-4">
Expand Down
1 change: 1 addition & 0 deletions src/lib/db/schema/invitations.query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ type CreateInvitationParams = Omit<
type UpdateInvitationParams = {
id: Invitation["id"];
title?: Invitation["title"];
description?: Invitation["description"];
customFields?: Invitation["customFields"];
eventUrl?: Invitation["eventUrl"];
thumbnailUrl?: Invitation["thumbnailUrl"];
Expand Down

0 comments on commit f9fff3d

Please sign in to comment.