- Add translation keys to home namespace: - home.banner.doNotShowToday: Banner "don't show today" button - home.banner.close: Banner close button - home.biometricRegistration.*: Biometric registration dialog - home.notice.goTo: Notice item navigation label - Localize 3 UI components: - ui/home-bottom-banner.tsx: Banner bottom sheet buttons - ui/home-notice-item.tsx: Notice item alt text - ui/auth-reguster.tsx: Biometric registration dialog - All other home components already localized 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
46 lines
1.2 KiB
TypeScript
46 lines
1.2 KiB
TypeScript
import moment from 'moment';
|
|
import { PATHS } from '@/shared/constants/paths';
|
|
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
|
import { NoticeItemProps } from '@/entities/support/model/types';
|
|
import { useTranslation } from 'react-i18next';
|
|
import { IMAGE_ROOT } from '@/shared/constants/common';
|
|
|
|
export const HomeNoticeItem = ({
|
|
seq,
|
|
title,
|
|
informCl,
|
|
regDt,
|
|
}: NoticeItemProps) => {
|
|
const { navigate } = useNavigate();
|
|
const { t } = useTranslation();
|
|
|
|
const onClickToDetail = () => {
|
|
navigate(PATHS.support.notice.detail, {
|
|
state: {
|
|
seq: seq,
|
|
from: PATHS.home
|
|
}
|
|
})
|
|
};
|
|
|
|
return (
|
|
<>
|
|
<div
|
|
className="notice-item"
|
|
onClick={ () => onClickToDetail() }
|
|
>
|
|
<div className="notice-content">
|
|
<div className="notice-title">{ title }</div>
|
|
<div className="notice-meta">{ t(`support.notice.categories.${informCl}`) }<span>{ moment(regDt).format('YY년 MM월 DD일') }</span></div>
|
|
</div>
|
|
<div className="notice-arrow">
|
|
<img
|
|
src={ IMAGE_ROOT + '/Forward.svg' }
|
|
alt={t('home.notice.goTo')}
|
|
/>
|
|
</div>
|
|
</div>
|
|
</>
|
|
);
|
|
};
|