Skip to content

Commit

Permalink
refactor: add type signature
Browse files Browse the repository at this point in the history
  • Loading branch information
rarlala committed Sep 16, 2024
1 parent 0b4a588 commit c3504f5
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 13 deletions.
6 changes: 3 additions & 3 deletions src/components/footer/info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ const Info = memo(function Info() {
<div className="relative flex">
<div className="leading-6">
<ul className="flex text-xs gap-[10px] mt-3 mb-1">
{INFO_MENU_LIST.map(({ title, link, style }) => (
<li key={title}>
{INFO_MENU_LIST.map(({ text, link, style }) => (
<li key={text}>
<a href={link} className={style}>
{title}
{text}
</a>
</li>
))}
Expand Down
22 changes: 12 additions & 10 deletions src/constants/footer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export const FOOTER_SNS_LIST = [
import { FooterMenuType, FooterSnsType } from '@/types/footer';

export const FOOTER_SNS_LIST: FooterSnsType[] = [
{
imgSrc: '/static/images/icon_appstore.png',
link: '',
Expand All @@ -21,7 +23,7 @@ export const FOOTER_SNS_LIST = [
},
] as const;

export const NOTICE_LIST = [
export const NOTICE_LIST: FooterMenuType[] = [
{ text: '[공지] 개인정보 처리방침 개정 예정 안내', link: '' },
{
text: '[공지] 추석 연휴 고객센터 휴무 및 배송/반품 일정 안내',
Expand All @@ -38,7 +40,7 @@ export const NOTICE_LIST = [
},
];

export const ABOUT_US_MENU_LIST = [
export const ABOUT_US_MENU_LIST: FooterMenuType[] = [
{ text: 'eqCM 소개', link: '' },
{
text: '인재채용',
Expand All @@ -47,7 +49,7 @@ export const ABOUT_US_MENU_LIST = [
{ text: '상시 할인 혜택', link: '' },
];

export const MY_ORDER_MENU_LIST = [
export const MY_ORDER_MENU_LIST: FooterMenuType[] = [
{ text: '주문배송', link: '' },
{
text: '취소/교환/반품 내역',
Expand All @@ -57,7 +59,7 @@ export const MY_ORDER_MENU_LIST = [
{ text: '증빙서류발급', link: '' },
];

export const MY_ACCOUNT_MENU_LIST = [
export const MY_ACCOUNT_MENU_LIST: FooterMenuType[] = [
{ text: '회원정보수정', link: '' },
{
text: '회원등급',
Expand All @@ -67,7 +69,7 @@ export const MY_ACCOUNT_MENU_LIST = [
{ text: '쿠폰', link: '' },
];

export const HELP_MENU_LIST = [
export const HELP_MENU_LIST: FooterMenuType[] = [
{ text: '1:1 문의내역', link: '' },
{
text: '마케팅 제휴, 입점, 대량 주문 문의',
Expand All @@ -79,8 +81,8 @@ export const HELP_MENU_LIST = [
{ text: '고객의 소리', link: '' },
];

export const INFO_MENU_LIST = [
{ title: '개인정보처리방침', link: '', style: 'font-medium' },
{ title: '이용약관', link: '' },
{ title: '분쟁해결기준', link: '', style: 'font-medium' },
export const INFO_MENU_LIST: FooterMenuType[] = [
{ text: '개인정보처리방침', link: '', style: 'font-medium' },
{ text: '이용약관', link: '' },
{ text: '분쟁해결기준', link: '', style: 'font-medium' },
];
11 changes: 11 additions & 0 deletions src/types/footer.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export type FooterSnsType = {
imgSrc: string;
link: string;
alt: string;
};

export type FooterMenuType = {
text: string;
link: string;
style?: string;
};

0 comments on commit c3504f5

Please sign in to comment.