ci 오류 수정
This commit is contained in:
@@ -9,6 +9,8 @@ import { createCtaTemplateBlocks } from "@/app/editor/templates/ctaTemplate";
|
||||
import { createFaqTemplateBlocks } from "@/app/editor/templates/faqTemplate";
|
||||
import { createPricingTemplateBlocks } from "@/app/editor/templates/pricingTemplate";
|
||||
import { createTestimonialsTemplateBlocks } from "@/app/editor/templates/testimonialsTemplate";
|
||||
import { getEditorTemplatesMessages } from "@/features/i18n/messages/editorTemplates";
|
||||
import { DEFAULT_LOCALE } from "@/features/i18n/locale";
|
||||
|
||||
// 블록 타입 정의: 텍스트/버튼/이미지/비디오/섹션/구분선/리스트/폼 블록/폼 요소 블록
|
||||
export type BlockType =
|
||||
@@ -914,9 +916,11 @@ const createEditorState = (set: any, get: any): EditorState => {
|
||||
}
|
||||
}
|
||||
|
||||
const tpl = getEditorTemplatesMessages(DEFAULT_LOCALE);
|
||||
const { blocks: templateBlocks, lastSelectedId } = createHeroTemplateBlocks({
|
||||
sectionId,
|
||||
createId,
|
||||
messages: tpl.hero,
|
||||
});
|
||||
|
||||
pushHistoryImpl(set, get);
|
||||
@@ -937,11 +941,6 @@ const createEditorState = (set: any, get: any): EditorState => {
|
||||
});
|
||||
},
|
||||
|
||||
// 리스트 아이템 선택 상태를 업데이트한다.
|
||||
selectListItem: (itemId) => {
|
||||
set({ selectedListItemId: itemId ?? null });
|
||||
},
|
||||
|
||||
// Features 템플릿 섹션 추가: 3컬럼(4/4/4) 섹션과 각 컬럼의 제목/설명 텍스트를 생성한다
|
||||
addFeaturesTemplateSection: () => {
|
||||
const { selectedBlockId, blocks } = get();
|
||||
@@ -956,9 +955,11 @@ const createEditorState = (set: any, get: any): EditorState => {
|
||||
}
|
||||
}
|
||||
|
||||
const tpl = getEditorTemplatesMessages(DEFAULT_LOCALE);
|
||||
const { blocks: templateBlocks, lastSelectedId } = createFeaturesTemplateBlocks({
|
||||
sectionId,
|
||||
createId,
|
||||
messages: tpl.features,
|
||||
});
|
||||
|
||||
pushHistoryImpl(set, get);
|
||||
@@ -993,9 +994,11 @@ const createEditorState = (set: any, get: any): EditorState => {
|
||||
}
|
||||
}
|
||||
|
||||
const tpl = getEditorTemplatesMessages(DEFAULT_LOCALE);
|
||||
const { blocks: templateBlocks, lastSelectedId } = createBlogTemplateBlocks({
|
||||
sectionId,
|
||||
createId,
|
||||
messages: tpl.blog,
|
||||
});
|
||||
|
||||
pushHistoryImpl(set, get);
|
||||
@@ -1030,9 +1033,11 @@ const createEditorState = (set: any, get: any): EditorState => {
|
||||
}
|
||||
}
|
||||
|
||||
const tpl = getEditorTemplatesMessages(DEFAULT_LOCALE);
|
||||
const { blocks: templateBlocks, lastSelectedId } = createTeamTemplateBlocks({
|
||||
sectionId,
|
||||
createId,
|
||||
messages: tpl.team,
|
||||
});
|
||||
|
||||
pushHistoryImpl(set, get);
|
||||
@@ -1067,9 +1072,11 @@ const createEditorState = (set: any, get: any): EditorState => {
|
||||
}
|
||||
}
|
||||
|
||||
const tpl = getEditorTemplatesMessages(DEFAULT_LOCALE);
|
||||
const { blocks: templateBlocks, lastSelectedId } = createFooterTemplateBlocks({
|
||||
sectionId,
|
||||
createId,
|
||||
messages: tpl.footer,
|
||||
});
|
||||
|
||||
pushHistoryImpl(set, get);
|
||||
@@ -1104,9 +1111,11 @@ const createEditorState = (set: any, get: any): EditorState => {
|
||||
}
|
||||
}
|
||||
|
||||
const tpl = getEditorTemplatesMessages(DEFAULT_LOCALE);
|
||||
const { blocks: templateBlocks, lastSelectedId } = createCtaTemplateBlocks({
|
||||
sectionId,
|
||||
createId,
|
||||
messages: tpl.cta,
|
||||
});
|
||||
|
||||
pushHistoryImpl(set, get);
|
||||
@@ -1141,9 +1150,11 @@ const createEditorState = (set: any, get: any): EditorState => {
|
||||
}
|
||||
}
|
||||
|
||||
const tpl = getEditorTemplatesMessages(DEFAULT_LOCALE);
|
||||
const { blocks: templateBlocks, lastSelectedId } = createFaqTemplateBlocks({
|
||||
sectionId,
|
||||
createId,
|
||||
messages: tpl.faq,
|
||||
});
|
||||
|
||||
pushHistoryImpl(set, get);
|
||||
@@ -1733,6 +1744,11 @@ const createEditorState = (set: any, get: any): EditorState => {
|
||||
}));
|
||||
},
|
||||
|
||||
// 현재 선택된 리스트 아이템 ID 를 상태에 저장한다.
|
||||
selectListItem: (itemId) => {
|
||||
set({ selectedListItemId: itemId });
|
||||
},
|
||||
|
||||
// 선택된 리스트 아이템을 들여쓰기한다.
|
||||
indentSelectedListItem: (blockId) => {
|
||||
const { blocks, selectedListItemId } = get();
|
||||
|
||||
@@ -7,24 +7,24 @@ export function LocaleSwitcher() {
|
||||
const locale = useAppLocale();
|
||||
const { setLocale } = useLocaleActions();
|
||||
|
||||
const handleChange = (event: React.ChangeEvent<HTMLSelectElement>) => {
|
||||
const nextLocale = event.target.value as AppLocale;
|
||||
const handleToggle = () => {
|
||||
const nextLocale: AppLocale = locale === "en" ? "ko" : "en";
|
||||
setLocale(nextLocale);
|
||||
};
|
||||
|
||||
const labelText = locale === "en" ? "EN" : "KO";
|
||||
|
||||
return (
|
||||
<div className="fixed bottom-4 right-4 z-50 text-xs">
|
||||
<label className="inline-flex items-center gap-1 rounded border border-slate-300 bg-white/80 px-2 py-1 text-slate-700 shadow-sm backdrop-blur dark:border-slate-700 dark:bg-slate-900/80 dark:text-slate-100">
|
||||
<span>Language</span>
|
||||
<select
|
||||
className="bg-transparent text-xs outline-none"
|
||||
value={locale}
|
||||
onChange={handleChange}
|
||||
>
|
||||
<option value="en">English</option>
|
||||
<option value="ko">한국어</option>
|
||||
</select>
|
||||
</label>
|
||||
<button
|
||||
type="button"
|
||||
aria-label="Toggle locale"
|
||||
className="inline-flex items-center justify-center rounded-full border border-slate-300 bg-white/80 px-2 py-1 text-slate-700 shadow-sm backdrop-blur dark:border-slate-700 dark:bg-slate-900/80 dark:text-slate-100"
|
||||
onClick={handleToggle}
|
||||
>
|
||||
{labelText}
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user