diff --git a/front/components/Play/PartitionMagic.tsx b/front/components/Play/PartitionMagic.tsx index 114560d..0fb56c0 100644 --- a/front/components/Play/PartitionMagic.tsx +++ b/front/components/Play/PartitionMagic.tsx @@ -10,7 +10,7 @@ import LoadingComponent from '../Loading'; import { SplendidGrandPiano } from 'smplr'; export type ParitionMagicProps = { - playType: 'practice' | 'normal' | null + playType: 'practice' | 'normal' | null; timestamp: number; songID: number; shouldPlay: boolean; @@ -202,8 +202,7 @@ const PartitionMagic = ({ easing: Easing.inOut(Easing.ease), } ); - if (playType == 'practice') - return; + if (playType == 'practice') return; cursor.notes.forEach((note) => { piano.current?.start({ note: note.note, diff --git a/front/components/Play/PlayViewControlBar.tsx b/front/components/Play/PlayViewControlBar.tsx index 38621b0..397eb49 100644 --- a/front/components/Play/PlayViewControlBar.tsx +++ b/front/components/Play/PlayViewControlBar.tsx @@ -109,18 +109,19 @@ const PlayViewControlBar = ({ gap: isPhone ? 10 : 25, }} > - { playType != 'practice' && - } + {playType != 'practice' && ( + + )} - { playType != 'practice' && - } + {playType != 'practice' && } ); diff --git a/front/views/PlayView.tsx b/front/views/PlayView.tsx index 87a0f7d..18d8eed 100644 --- a/front/views/PlayView.tsx +++ b/front/views/PlayView.tsx @@ -174,8 +174,7 @@ const PlayView = ({ songId }: PlayViewProps) => { toast.show({ description: 'Scoro: ' + data.error }); return; } - if (data.type == 'pong') - return; + if (data.type == 'pong') return; if (data.type == 'end') { const maxPoints = data.score.max_score || 1; const points = data.overallScore; @@ -193,8 +192,8 @@ const PlayView = ({ songId }: PlayViewProps) => { setScore(Math.floor((Math.max(points, 0) * 100) / maxPoints)); if (data.type == 'step') { - setTime(data.timestamp) - return + setTime(data.timestamp); + return; } let formattedMessage = ''; let messageColor: ColorSchemeType | undefined;