refactor: 멤버 영어이름 하드코딩 제거, API에서 가져오도록 변경
- MEMBER_ENGLISH_NAMES 상수 제거 - Birthday 페이지에서 member.name_en 사용 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
97850b12c1
commit
b49e5e277d
3 changed files with 4 additions and 21 deletions
|
|
@ -57,16 +57,3 @@ export const MONTH_NAMES = [
|
||||||
'1월', '2월', '3월', '4월', '5월', '6월',
|
'1월', '2월', '3월', '4월', '5월', '6월',
|
||||||
'7월', '8월', '9월', '10월', '11월', '12월',
|
'7월', '8월', '9월', '10월', '11월', '12월',
|
||||||
];
|
];
|
||||||
|
|
||||||
/** 멤버 한글 이름 → 영어 이름 매핑 */
|
|
||||||
export const MEMBER_ENGLISH_NAMES = {
|
|
||||||
송하영: 'HAYOUNG',
|
|
||||||
박지원: 'JIWON',
|
|
||||||
이채영: 'CHAEYOUNG',
|
|
||||||
이나경: 'NAKYUNG',
|
|
||||||
백지헌: 'JIHEON',
|
|
||||||
장규리: 'GYURI',
|
|
||||||
이새롬: 'SAEROM',
|
|
||||||
노지선: 'JISUN',
|
|
||||||
이서연: 'SEOYEON',
|
|
||||||
};
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ import { useQuery } from '@tanstack/react-query';
|
||||||
import { motion } from 'framer-motion';
|
import { motion } from 'framer-motion';
|
||||||
import { ChevronLeft } from 'lucide-react';
|
import { ChevronLeft } from 'lucide-react';
|
||||||
import { fetchApi } from '@/api/client';
|
import { fetchApi } from '@/api/client';
|
||||||
import { MEMBER_ENGLISH_NAMES } from '@/constants';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mobile 생일 페이지
|
* Mobile 생일 페이지
|
||||||
|
|
@ -13,7 +12,6 @@ function MobileBirthday() {
|
||||||
|
|
||||||
// URL 디코딩
|
// URL 디코딩
|
||||||
const decodedMemberName = decodeURIComponent(memberName || '');
|
const decodedMemberName = decodeURIComponent(memberName || '');
|
||||||
const englishName = MEMBER_ENGLISH_NAMES[decodedMemberName];
|
|
||||||
|
|
||||||
// 멤버 정보 조회
|
// 멤버 정보 조회
|
||||||
const {
|
const {
|
||||||
|
|
@ -61,7 +59,7 @@ function MobileBirthday() {
|
||||||
</Link>
|
</Link>
|
||||||
<div className="flex-1 text-center">
|
<div className="flex-1 text-center">
|
||||||
<span className="text-sm font-medium bg-gradient-to-r from-pink-500 via-purple-500 to-indigo-500 bg-clip-text text-transparent">
|
<span className="text-sm font-medium bg-gradient-to-r from-pink-500 via-purple-500 to-indigo-500 bg-clip-text text-transparent">
|
||||||
HAPPY {englishName} DAY
|
HAPPY {member?.name_en} DAY
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="w-10" />
|
<div className="w-10" />
|
||||||
|
|
@ -98,7 +96,7 @@ function MobileBirthday() {
|
||||||
<div className="flex-1 text-white">
|
<div className="flex-1 text-white">
|
||||||
<div className="flex items-center gap-2 mb-1">
|
<div className="flex items-center gap-2 mb-1">
|
||||||
<span className="text-3xl">🎂</span>
|
<span className="text-3xl">🎂</span>
|
||||||
<h1 className="font-bold text-xl tracking-wide">HAPPY {englishName} DAY</h1>
|
<h1 className="font-bold text-xl tracking-wide">HAPPY {member?.name_en} DAY</h1>
|
||||||
</div>
|
</div>
|
||||||
<p className="text-white/80 text-sm">
|
<p className="text-white/80 text-sm">
|
||||||
{year}년 {birthdayThisYear?.getMonth() + 1}월 {birthdayThisYear?.getDate()}일
|
{year}년 {birthdayThisYear?.getMonth() + 1}월 {birthdayThisYear?.getDate()}일
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ import { useQuery } from '@tanstack/react-query';
|
||||||
import { motion } from 'framer-motion';
|
import { motion } from 'framer-motion';
|
||||||
import { ChevronRight } from 'lucide-react';
|
import { ChevronRight } from 'lucide-react';
|
||||||
import { fetchApi } from '@/api/client';
|
import { fetchApi } from '@/api/client';
|
||||||
import { MEMBER_ENGLISH_NAMES } from '@/constants';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PC 생일 페이지
|
* PC 생일 페이지
|
||||||
|
|
@ -13,7 +12,6 @@ function PCBirthday() {
|
||||||
|
|
||||||
// URL 디코딩
|
// URL 디코딩
|
||||||
const decodedMemberName = decodeURIComponent(memberName || '');
|
const decodedMemberName = decodeURIComponent(memberName || '');
|
||||||
const englishName = MEMBER_ENGLISH_NAMES[decodedMemberName];
|
|
||||||
|
|
||||||
// 멤버 정보 조회
|
// 멤버 정보 조회
|
||||||
const {
|
const {
|
||||||
|
|
@ -61,7 +59,7 @@ function PCBirthday() {
|
||||||
</Link>
|
</Link>
|
||||||
<ChevronRight size={14} />
|
<ChevronRight size={14} />
|
||||||
<span className="font-medium bg-gradient-to-r from-pink-500 via-purple-500 to-indigo-500 bg-clip-text text-transparent">
|
<span className="font-medium bg-gradient-to-r from-pink-500 via-purple-500 to-indigo-500 bg-clip-text text-transparent">
|
||||||
HAPPY {englishName} DAY
|
HAPPY {member?.name_en} DAY
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -96,7 +94,7 @@ function PCBirthday() {
|
||||||
<div className="flex-1 text-white">
|
<div className="flex-1 text-white">
|
||||||
<div className="flex items-center gap-3 mb-2">
|
<div className="flex items-center gap-3 mb-2">
|
||||||
<span className="text-5xl">🎂</span>
|
<span className="text-5xl">🎂</span>
|
||||||
<h1 className="font-bold text-4xl tracking-wide">HAPPY {englishName} DAY</h1>
|
<h1 className="font-bold text-4xl tracking-wide">HAPPY {member?.name_en} DAY</h1>
|
||||||
</div>
|
</div>
|
||||||
<p className="text-white/80 text-lg mt-2">
|
<p className="text-white/80 text-lg mt-2">
|
||||||
{year}년 {birthdayThisYear?.getMonth() + 1}월 {birthdayThisYear?.getDate()}일
|
{year}년 {birthdayThisYear?.getMonth() + 1}월 {birthdayThisYear?.getDate()}일
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue