Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Commit

Permalink
Fix improper rendering logic in aural
Browse files Browse the repository at this point in the history
  • Loading branch information
Adamv27 committed Mar 6, 2024
1 parent 549ab44 commit 06246bc
Showing 1 changed file with 46 additions and 45 deletions.
91 changes: 46 additions & 45 deletions components/student/create/aural.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,51 +120,52 @@ export default function CreativityAuralActivity() {
<>
<FlatMelodyViewer score={scoreJSON} onLoad={setJson} />
{ json && (
<Row>
<Col md={4}>
<ChordScaleBucketScore
height={150}
referenceScoreJSON={json}
chordScaleBucket="tonic"
colors='tonic'
instrumentName={currentAssignment?.instrument}
/>
</Col>
<Col md={4}>
<ChordScaleBucketScore
height={150}
referenceScoreJSON={json}
chordScaleBucket="subdominant"
colors='subdominant'
instrumentName={currentAssignment?.instrument}
/>
</Col>
<Col md={4}>
<ChordScaleBucketScore
height={150}
referenceScoreJSON={json}
chordScaleBucket="dominant"
colors='dominant'
instrumentName={currentAssignment?.instrument}
/>
</Col>
</Row>
) && (
/* TODO: if the student has already submitted this, do we show their submission here? if so how would they start over? */
<FlatEditor
edit
score={{
scoreId: 'blank',
}}
// onSubmit={setJsonWrapper}
submittingStatus={mutation.status}
onUpdate={(data) => {
composition.current = data;
console.log('composition updated', data)
}}
orig={json}
colors={currentAssignment?.part?.chord_scale_pattern}
/>
<>
<Row>
<Col md={4}>
<ChordScaleBucketScore
height={150}
referenceScoreJSON={json}
chordScaleBucket="tonic"
colors='tonic'
instrumentName={currentAssignment?.instrument}
/>
</Col>
<Col md={4}>
<ChordScaleBucketScore
height={150}
referenceScoreJSON={json}
chordScaleBucket="subdominant"
colors='subdominant'
instrumentName={currentAssignment?.instrument}
/>
</Col>
<Col md={4}>
<ChordScaleBucketScore
height={150}
referenceScoreJSON={json}
chordScaleBucket="dominant"
colors='dominant'
instrumentName={currentAssignment?.instrument}
/>
</Col>
</Row>
/* TODO: if the student has already submitted this, do we show their submission here? if so how would they start over? */
<FlatEditor
edit
score={{
scoreId: 'blank',
}}
// onSubmit={setJsonWrapper}
submittingStatus={mutation.status}
onUpdate={(data) => {
composition.current = data;
console.log('composition updated', data)
}}
orig={json}
colors={currentAssignment?.part?.chord_scale_pattern}
/>
</>
)}
<Recorder
submit={submitCreativity}
Expand Down

0 comments on commit 06246bc

Please sign in to comment.