Skip to content

Commit

Permalink
feat: 이벤트 페르소나 지정 (크리스마스)
Browse files Browse the repository at this point in the history
  • Loading branch information
sumi-0011 committed Dec 25, 2024
1 parent 3933a55 commit 6d420d7
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion apps/web/src/app/[locale]/shop/AuctionSection/PersonaSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ import { LoaderIcon, SearchIcon, XIcon } from 'lucide-react';
import { getPersonaImage } from '@/utils/image';

const EVENT = {
CHRISTMAS: {
label: 'Christmas 2024 🎄',
personaTypeList: [
'SNOWMAN',
'DESSERT_FOX_RUDOLPH',
'LITTLE_CHICK_SANTA',
'RABBIT_BROWN_RUDOLPH',
'SNOWMAN_MELT',
'HAMSTER_SANTA',
],
},
HALLOWEEN: {
label: 'Halloween 2024 🎃',
personaTypeList: ['SLIME_PUMPKIN_1', 'SLIME_PUMPKIN_2', 'GHOST', 'GHOST_KING', 'SCREAM', 'SCREAM_GHOST'],
Expand Down Expand Up @@ -46,7 +57,7 @@ export const PersonaSearch = wrap

const { data } = useSuspenseQuery(auctionQueries.productTypesOptions());

const eventPersonaTypeList = EVENT.HALLOWEEN.personaTypeList;
const eventPersonaTypeList = Object.values(EVENT).flatMap((event) => event.personaTypeList);
const filteredPersonaTypeList = data?.productTypes.filter((type) => !eventPersonaTypeList.includes(type.name));

const onClick = (personaType: string) => {
Expand Down

0 comments on commit 6d420d7

Please sign in to comment.