feat: 다국어 화
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { FormEvent, useState } from 'react';
|
||||
import { useI18n } from '@/features/i18n/model/useI18n';
|
||||
|
||||
export function BoardingMissionForm({
|
||||
onDock,
|
||||
@@ -13,6 +14,7 @@ export function BoardingMissionForm({
|
||||
autoFocus?: boolean;
|
||||
compact?: boolean;
|
||||
}) {
|
||||
const { t } = useI18n();
|
||||
const [mission, setMission] = useState('');
|
||||
const trimmedMission = mission.trim();
|
||||
const canSubmit = Boolean(trimmedMission);
|
||||
@@ -30,13 +32,13 @@ export function BoardingMissionForm({
|
||||
>
|
||||
<div className="space-y-3">
|
||||
<label className="block text-sm font-medium text-slate-300">
|
||||
이번 항해의 핵심 목표
|
||||
{t('boarding.missionLabel')}
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
value={mission}
|
||||
onChange={(event) => setMission(event.target.value)}
|
||||
placeholder="예: 서론 3문단 완성하기"
|
||||
placeholder={t('boarding.missionPlaceholder')}
|
||||
className="w-full border-b-2 border-slate-700 bg-slate-900/50 px-0 py-3 text-lg outline-none transition-colors placeholder:text-slate-600 focus:border-indigo-500"
|
||||
autoFocus={autoFocus}
|
||||
/>
|
||||
@@ -49,7 +51,7 @@ export function BoardingMissionForm({
|
||||
onClick={onCancel}
|
||||
className="rounded-xl border border-slate-700 bg-transparent px-4 py-2 font-semibold text-slate-300 transition-colors hover:bg-slate-900/60 hover:text-white"
|
||||
>
|
||||
취소
|
||||
{t('boarding.cancel')}
|
||||
</button>
|
||||
)}
|
||||
<button
|
||||
@@ -57,7 +59,7 @@ export function BoardingMissionForm({
|
||||
disabled={!canSubmit}
|
||||
className={`rounded-xl bg-indigo-600 font-bold text-white transition-all shadow-lg shadow-indigo-900/30 hover:bg-indigo-500 disabled:bg-slate-800 disabled:text-slate-500 ${compact ? 'px-6 py-2' : 'w-full py-4 text-lg'}`}
|
||||
>
|
||||
도킹 완료 (출항)
|
||||
{t('boarding.submit')}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user