CSS z-index 속성은 위치 지정 요소와, 그 자손 또는 하위 플렉스 아이템의 Z축 순서를 지정한다
겹치는 부분이 많아 리펙토링이 가능할꺼 같은데,
구현 후 시간이 좀 남으면 생각을 해보자
{select_1 === "ALL" ? (
<div className={style.select_1_All_container}>
<div className={style.subtitle}>동기부여를 받고 싶다면 ?</div>
<div className={style.contents}>
<div className={style.contents_part}>
# 영상
<ContentsPage_carousel
handleClick={handleClick}
select_1_category={select_1_category.filter(
(el) => el.type === "video" && el.category === "동기부여"
)}
/>
</div>
<div className={style.contents_part}>
# 영화
<ContentsPage_carousel
select_1_category={select_1_category.filter(
(el) => el.type === "movie" && el.category === "동기부여"
)}
/>
</div>
<div className={style.contents_part}>
# 책
<ContentsPage_carousel
select_1_category={select_1_category.filter(
(el) => el.type === "book" && el.category === "동기부여"
)}
/>
</div>
<div className={style.contents_part}>
# 음악
<ContentsPage_carousel
select_1_category={select_1_category.filter(
(el) => el.type === "music" && el.category === "동기부여"
)}
/>
</div>
</div>
<div className={style.subtitle}>도전하고 싶은 나에게</div>
<div className={style.contents}>
<div className={style.contents_part}>
# 영상
<ContentsPage_carousel
select_1_category={select_1_category.filter(
(el) => el.type === "video" && el.category === "도전"
)}
/>
</div>
<div className={style.contents_part}>
# 영화
<ContentsPage_carousel
select_1_category={select_1_category.filter(
(el) => el.type === "movie" && el.category === "도전"
)}
/>
</div>
<div className={style.contents_part}>
# 책
<ContentsPage_carousel
select_1_category={select_1_category.filter(
(el) => el.type === "book" && el.category === "도전"
)}
/>
</div>
<div className={style.contents_part}>
# 음악
<ContentsPage_carousel
select_1_category={select_1_category.filter(
(el) => el.type === "music" && el.category === "도전"
)}
/>
</div>
</div>
<div className={style.subtitle}>
현재 나의 상황에 멘토를 원하시나요 ?
</div>
<div className={style.contents}>
<div className={style.contents_part}>
# 영상
<ContentsPage_carousel
select_1_category={select_1_category.filter(
(el) => el.type === "video" && el.category === "멘토"
)}
/>
</div>
<div className={style.contents_part}>
# 영화
<ContentsPage_carousel
select_1_category={select_1_category.filter(
(el) => el.type === "movie" && el.category === "멘토"
)}
/>
</div>
<div className={style.contents_part}>
# 책
<ContentsPage_carousel
select_1_category={select_1_category.filter(
(el) => el.type === "book" && el.category === "멘토"
)}
/>
</div>
<div className={style.contents_part}>
# 음악
<ContentsPage_carousel
select_1_category={select_1_category.filter(
(el) => el.type === "music" && el.category === "멘토"
)}
/>
</div>
</div>
<div className={style.subtitle}>생각없이 웃고 싶다면 ?</div>
<div className={style.contents}>
<div className={style.contents_part}>
# 영상
<ContentsPage_carousel
select_1_category={select_1_category.filter(
(el) => el.type === "video" && el.category === "웃음"
)}
/>
</div>
<div className={style.contents_part}>
# 영화
<ContentsPage_carousel
select_1_category={select_1_category.filter(
(el) => el.type === "movie" && el.category === "웃음"
)}
/>
</div>
<div className={style.contents_part}>
# 책
<ContentsPage_carousel
select_1_category={select_1_category.filter(
(el) => el.type === "book" && el.category === "웃음"
)}
/>
</div>
<div className={style.contents_part}>
# 음악
<ContentsPage_carousel
select_1_category={select_1_category.filter(
(el) => el.type === "music" && el.category === "웃음"
)}
/>
</div>
</div>
<div className={style.subtitle}>
오늘 한 없이 눈물을 쏟고 싶다면 ?
</div>
<div className={style.contents}>
<div className={style.contents_part}>
# 영상
<ContentsPage_carousel
select_1_category={select_1_category.filter(
(el) => el.type === "video" && el.category === "눈물"
)}
/>
</div>
<div className={style.contents_part}>
# 영화
<ContentsPage_carousel
select_1_category={select_1_category.filter(
(el) => el.type === "movie" && el.category === "눈물"
)}
/>
</div>
<div className={style.contents_part}>
# 책
<ContentsPage_carousel
select_1_category={select_1_category.filter(
(el) => el.type === "book" && el.category === "눈물"
)}
/>
</div>
<div className={style.contents_part}>
# 음악
<ContentsPage_carousel
select_1_category={select_1_category.filter(
(el) => el.type === "music" && el.category === "눈물"
)}
/>
</div>
</div>
<div className={style.subtitle_sound}>백색소리</div>
<div className={style.contents}>
<div className={style.contents_part}>
# 영상
<ContentsPage_carousel
select_1_category={select_1_category.filter(
(el) => el.type === "video" && el.category === "백색소리"
)}
/>
</div>
<div className={style.contents_part}>
# 음악
<ContentsPage_carousel
select_1_category={select_1_category.filter(
(el) => el.type === "music" && el.category === "백색소리"
)}
/>
</div>
</div>
</div>
) : select_1 === "백색소리" && select_2 === "ALL" ? (
<div className={style.select_1_All_container}>
<div className={style.contents_part}>
# 영상
<ContentsPage_carousel_firstSelect
select_1_category={select_1_category.filter(
(el) => el.type === "video" && el.category === "백색소리"
)}
/>
</div>
<div className={style.contents_part}>
# 음악
<ContentsPage_carousel_firstSelect
select_1_category={select_1_category.filter(
(el) => el.type === "music" && el.category === "백색소리"
)}
/>
</div>
</div>
) : select_2 === "ALL" ? (
<div className={style.select_1_All_container}>
<div className={style.contents_part}>
# 영상
<ContentsPage_carousel_firstSelect
select_1_category={select_1_category.filter(
(el) => el.type === "video"
)}
/>
</div>
<div className={style.contents_part}>
# 영화
<ContentsPage_carousel_firstSelect
select_1_category={select_1_category.filter(
(el) => el.type === "movie"
)}
/>
</div>
<div className={style.contents_part}>
# 책
<ContentsPage_carousel_firstSelect
select_1_category={select_1_category.filter(
(el) => el.type === "book"
)}
/>
</div>
<div className={style.contents_part}>
# 음악
<ContentsPage_carousel_firstSelect
select_1_category={select_1_category.filter(
(el) => el.type === "music"
)}
/>
</div>
</div>
) : (
<ContentsPage_secondSelect select_2_contents={select_2_contents} />
)}