Skip to content

Commit

Permalink
pass RhythmCodeIcon required data down as props
Browse files Browse the repository at this point in the history
  • Loading branch information
ManSangSin committed Oct 18, 2023
1 parent 3a675a4 commit 9c2c8f4
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions client/src/components/MyMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { useState, useEffect } from "react";

import "./MyMap.css";
import ModalVideo from "../components/ModalVideo";
import RhythmCodeIcon from "../components/RhythmCodeIcon";
import DotMap from "../components/DotMap";

function MyMap() {
Expand Down Expand Up @@ -41,18 +40,12 @@ function MyMap() {

return (
<div>
<DotMap />
{rhythmCodes.map((rhythmCodeObject) => (
<RhythmCodeIcon
key={rhythmCodeObject.rhythm_code}
rhythmCodeName={rhythmCodeObject.rhythm_code}
rhythmsList={rhythms}
toppx={rhythmCodeObject.toppx}
leftpx={rhythmCodeObject.leftpx}
setModalOpen={setModalOpen}
setSelectedRhythm={setSelectedRhythm}
/>
))}
<DotMap
rhythmCodes={rhythmCodes}
rhythmsList={rhythms}
setModalOpen={setModalOpen}
setSelectedRhythm={setSelectedRhythm}
/>
{isModalOpen && (
<ModalVideo setModalOpen={setModalOpen} rhythm={selectedRhythm} />
)}
Expand Down

0 comments on commit 9c2c8f4

Please sign in to comment.