fix prettier
This commit is contained in:
committed by
Clément Le Bihan
parent
a24a960184
commit
2781276c12
@@ -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,
|
||||
|
||||
@@ -109,7 +109,7 @@ const PlayViewControlBar = ({
|
||||
gap: isPhone ? 10 : 25,
|
||||
}}
|
||||
>
|
||||
{ playType != 'practice' &&
|
||||
{playType != 'practice' && (
|
||||
<IconButton
|
||||
size="sm"
|
||||
variant="solid"
|
||||
@@ -120,7 +120,8 @@ const PlayViewControlBar = ({
|
||||
name: paused ? 'play' : 'pause',
|
||||
}}
|
||||
onPress={paused ? onResume : onPause}
|
||||
/>}
|
||||
/>
|
||||
)}
|
||||
<IconButton
|
||||
size="sm"
|
||||
colorScheme="coolGray"
|
||||
@@ -165,8 +166,7 @@ const PlayViewControlBar = ({
|
||||
minWidth: 120,
|
||||
}}
|
||||
>
|
||||
{ playType != 'practice' &&
|
||||
<MetronomeControls paused={paused} bpm={bpm.current} />}
|
||||
{playType != 'practice' && <MetronomeControls paused={paused} bpm={bpm.current} />}
|
||||
</View>
|
||||
</Row>
|
||||
);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user