Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<meta name="theme-color" content="#FF7070" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
<meta name="apple-mobile-web-app-title" content="Momentory" />

<!-- Apple Touch Icons -->
Expand Down
Binary file added src/assets/clothing/cat/가톨릭대고양이.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clothing/dog/가톨릭대강아지.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 14 additions & 5 deletions src/components/Shop/EventCard.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import type { ShopItem } from '../../types/shop';
import PointIcon from '../../assets/icons/pointIcon.svg';
import NoEventIcon from '../../assets/icons/noEvent.svg?react';
import CatholicCatImg from '../../assets/clothing/cat/가톨릭대고양이.png';
import CatholicDogImg from '../../assets/clothing/dog/가톨릭대강아지.png';

interface EventCardProps {
item: ShopItem | null;
Expand All @@ -18,13 +20,20 @@ const EventCard = ({ item, onClick, children }: EventCardProps) => (
children
) : item ? (
<>
<div className="rounded-xl p-[3px] bg-gradient-to-b from-[#F5A753] to-[#A97742]">
<div className="bg-white rounded-lg">
<img src={item.imageUrl} alt={item.name} className="w-20 h-20" />
<div className="flex gap-6 items-center">
<div className="rounded-xl p-[4px] bg-gradient-to-b from-[#F5A753] to-[#A97742]">
<div className="bg-white rounded-lg p-2">
<img src={CatholicCatImg} alt="가톨릭대 고양이" className="w-32 h-32" />
</div>
</div>
<div className="rounded-xl p-[4px] bg-gradient-to-b from-[#F5A753] to-[#A97742]">
<div className="bg-white rounded-lg p-2">
<img src={CatholicDogImg} alt="가톨릭대 강아지" className="w-32 h-32" />
</div>
</div>
</div>
<h2 className="text-xl font-bold text-[#D24848]">{item.name}</h2>
<p className="text-sm text-gray-500">{item.category}</p>
<h2 className="text-xl font-bold text-[#D24848]">가톨릭대 컴공 학술제</h2>
<p className="text-sm text-gray-500">🕛학술제 한정 아이템!</p>
<button
onClick={onClick}
className="flex items-center justify-center gap-2 px-10 py-3 mt-5 cursor-pointer text-lg font-bold text-white bg-[#FF7070] rounded-[20px]"
Expand Down
1 change: 1 addition & 0 deletions src/config/itemNameMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const clothingNameMap: Record<string, string> = {
'사슴의상': '사슴',
'악기의상': '악기',
'유령의상': '유령',
'가톨릭대': '가톨릭대',
};

export const effectNameMap: Record<string, string> = {
Expand Down
7 changes: 4 additions & 3 deletions src/pages/shop-page/EventPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Bg from '../../assets/accessories/bgImg.svg';
import PointIcon from '../../assets/icons/pointIcon.svg';
import type { ShopItem } from '../../types/shop';
import EventCard from '../../components/Shop/EventCard';
import { getShopEvents, purchaseItem } from '../../api/shop';
import { getShopItems, purchaseItem } from '../../api/shop';

const EventPage = () => {
const [point, setPoint] = useState(1500);
Expand All @@ -22,8 +22,9 @@ const EventPage = () => {
const fetchEventItems = async () => {
try {
setIsLoading(true);
const items = await getShopEvents();
setEventItems(items || []);
const items = await getShopItems('CLOTHING');
const catholicItem = items?.filter(item => item.name === '가톨릭대') || [];
setEventItems(catholicItem);
} catch (error) {
console.error('이벤트 아이템 불러오기 실패:', error);
setEventItems([]);
Expand Down
Loading