Skip to content

Commit

Permalink
Merge pull request #1 from Spaces-Place/dusqo
Browse files Browse the repository at this point in the history
category > type, title 추가 / 타입별로나누기
  • Loading branch information
KangYeonbae authored Nov 12, 2024
2 parents c9487b4 + 15c2d69 commit 024e2f6
Showing 1 changed file with 23 additions and 31 deletions.
54 changes: 23 additions & 31 deletions src/route/category.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState } from 'react';
import { Link } from 'react-router-dom';
import { IoIosMicrophone } from "react-icons/io";
import { FaCamera, FaCampground } from "react-icons/fa";
import { FaCampground } from "react-icons/fa";
import { IoVideocamSharp } from "react-icons/io5";
import { GiBandana, GiPartyPopper, GiGuitar } from "react-icons/gi";
import { FaDumbbell } from "react-icons/fa6";
Expand All @@ -11,39 +11,31 @@ import '../css/category.css'
import { FaBookOpenReader } from "react-icons/fa6";

// 카테고리별 아이템 매핑
const categoryItems = {
all: [
{ icon: <GiGuitar size={40} color="#000000" />, label: "악기연주(합주실)", isNew: true, to: "/playing" },
{ icon: <GiPartyPopper size={40} color="#000000" />, label: "파티룸", to: "/spaces/party" },
{ icon: <GiBandana size={40} color="#000000" />, label: "댄스연습실", to: "/spaces/dance" },
{ icon: <IoIosMicrophone size={40} color="#000000" />, label: "노래방", to: "/spaces/karaoke" },
{ icon: <IoVideocamSharp size={40} color="#000000" />, label: "스튜디오", to: "/spaces/studio" },
{ icon: <FaCampground size={40} color="#000000" />, label: "캠핑장", to: "/camping" },
{ icon: <FaDumbbell size={40} color="#000000" />, label: "헬스장", to: "/spaces/gym" },
{ icon: <PiOfficeChairDuotone size={40} color="#000000" />, label: "사무실", to: "/spaces/office" },
{ icon: <MdHotel size={40} color="#000000" />, label: "숙박", to: "/spaces/accommodation" },
{ icon: <PiCookingPotDuotone size={40} color="#000000" />, label: "공용주방", to: "/spaces/kitchen" },
{ icon: <FaBookOpenReader size={40} color="#000000" />, label: "스터디룸", to: "/spaces/kitchen" }
],
meeting: [
{ icon: <GiPartyPopper size={40} color="#000000" />, label: "파티룸", to: "/spaces/party" },
{ icon: <PiOfficeChairDuotone size={40} color="#000000" />, label: "사무실", to: "/spaces/office" },
{ icon: <PiCookingPotDuotone size={40} color="#000000" />, label: "공용주방", to: "/spaces/kitchen" }
],
practice: [ { icon: <GiGuitar size={40} color="#000000" />, label: "악기연주(합주실)", isNew: true, to: "/playing" },
{ icon: <GiBandana size={40} color="#000000" />, label: "댄스연습실", to: "/spaces/dance" },
const itemType = [
{ type: 'playing', title: "악기연주(합주실)", icon: <GiGuitar size={40} color="#000000" />, label:"악기연주(합주실)", isNew: true,to: "/playing" },
{ type: 'party', title: '파티룸', icon: <GiPartyPopper size={40} color="#000000" />, label:"파티룸", to: "/spaces/party" },
{ type: 'dance', title: "댄스연습실", icon: <GiBandana size={40} color="#000000" />, label:"댄스연습실", to: "/spaces/dance" },
{ type: 'karaoke', title: "노래방", icon: <IoIosMicrophone size={40} color="#000000" />, label:"노래방", to: "/spaces/karaoke" },
{ type: 'studio', title: "스튜디오", icon: <IoVideocamSharp size={40} color="#000000" />, label:"스튜디오", to: "/spaces/studio" },
{ type: 'camping', title: "캠핑장", icon: <FaCampground size={40} color="#000000" />, label:"캠핑장", to: "/camping" },
{ type: 'gym', title: "헬스장", icon: <FaDumbbell size={40} color="#000000" />, label:"헬스장", to: "/spaces/gym" },
{ type: 'office', title: "사무실", icon: <PiOfficeChairDuotone size={40} color="#000000" />, label:"사무실",to: "/spaces/office" },
{ type: 'accommodation', title: "숙박", icon: <MdHotel size={40} color="#000000" />, label:"숙박",to: "/spaces/accommodation" },
{ type: 'kitchen', title: "공용주방", icon: <PiCookingPotDuotone size={40} color="#000000" />, label:"공용주방", to: "/spaces/kitchen" },
{ type: 'studyroom', title: "스터디룸", icon: <FaBookOpenReader size={40} color="#000000" />, label:"스터디룸",to: "/spaces/studyroom" }
];


],
shooting: [{ icon: <IoVideocamSharp size={40} color="#000000" />, label: "스튜디오", to: "/spaces/studio" },],
bead: [ { icon: <FaCampground size={40} color="#000000" />, label: "캠핑장", to: "/camping"},
{ icon: <MdHotel size={40} color="#000000" />, label: "숙박", to: "/spaces/accommodation" },
],
office: [
{ icon: <PiOfficeChairDuotone size={40} color="#000000" />, label: "사무실", to: "/spaces/office" },
{ icon: <FaBookOpenReader size={40} color="#000000" />, label: "스터디룸", to: "/spaces/kitchen" }
]
const categoryItems = {
all: itemType,
meeting: itemType.filter(item => ['party', 'office', 'kitchen'].includes(item.type)),
practice: itemType.filter(item => ['playing', 'dance'].includes(item.type)),
shooting: itemType.filter(item => ['studio'].includes(item.type)),
bead: itemType.filter(item => ['camping', 'accommodation'].includes(item.type)),
office: itemType.filter(item => ['office', 'studyroom'].includes(item.type))
};


const CategoryItem = ({ icon, label, isNew, to }) => (
<Link to={to} className="category-item">
<div className="icon-wrapper">
Expand Down

0 comments on commit 024e2f6

Please sign in to comment.