fix prettier

This commit is contained in:
GitBluub
2024-01-17 10:12:59 +01:00
committed by Clément Le Bihan
parent a24a960184
commit 2781276c12
3 changed files with 19 additions and 21 deletions

View File

@@ -10,7 +10,7 @@ import LoadingComponent from '../Loading';
import { SplendidGrandPiano } from 'smplr'; import { SplendidGrandPiano } from 'smplr';
export type ParitionMagicProps = { export type ParitionMagicProps = {
playType: 'practice' | 'normal' | null playType: 'practice' | 'normal' | null;
timestamp: number; timestamp: number;
songID: number; songID: number;
shouldPlay: boolean; shouldPlay: boolean;
@@ -202,8 +202,7 @@ const PartitionMagic = ({
easing: Easing.inOut(Easing.ease), easing: Easing.inOut(Easing.ease),
} }
); );
if (playType == 'practice') if (playType == 'practice') return;
return;
cursor.notes.forEach((note) => { cursor.notes.forEach((note) => {
piano.current?.start({ piano.current?.start({
note: note.note, note: note.note,

View File

@@ -109,18 +109,19 @@ const PlayViewControlBar = ({
gap: isPhone ? 10 : 25, gap: isPhone ? 10 : 25,
}} }}
> >
{ playType != 'practice' && {playType != 'practice' && (
<IconButton <IconButton
size="sm" size="sm"
variant="solid" variant="solid"
disabled={disabled} disabled={disabled}
_icon={{ _icon={{
as: Ionicons, as: Ionicons,
color: colors.coolGray[900], color: colors.coolGray[900],
name: paused ? 'play' : 'pause', name: paused ? 'play' : 'pause',
}} }}
onPress={paused ? onResume : onPause} onPress={paused ? onResume : onPause}
/>} />
)}
<IconButton <IconButton
size="sm" size="sm"
colorScheme="coolGray" colorScheme="coolGray"
@@ -165,8 +166,7 @@ const PlayViewControlBar = ({
minWidth: 120, minWidth: 120,
}} }}
> >
{ playType != 'practice' && {playType != 'practice' && <MetronomeControls paused={paused} bpm={bpm.current} />}
<MetronomeControls paused={paused} bpm={bpm.current} />}
</View> </View>
</Row> </Row>
); );

View File

@@ -174,8 +174,7 @@ const PlayView = ({ songId }: PlayViewProps) => {
toast.show({ description: 'Scoro: ' + data.error }); toast.show({ description: 'Scoro: ' + data.error });
return; return;
} }
if (data.type == 'pong') if (data.type == 'pong') return;
return;
if (data.type == 'end') { if (data.type == 'end') {
const maxPoints = data.score.max_score || 1; const maxPoints = data.score.max_score || 1;
const points = data.overallScore; const points = data.overallScore;
@@ -193,8 +192,8 @@ const PlayView = ({ songId }: PlayViewProps) => {
setScore(Math.floor((Math.max(points, 0) * 100) / maxPoints)); setScore(Math.floor((Math.max(points, 0) * 100) / maxPoints));
if (data.type == 'step') { if (data.type == 'step') {
setTime(data.timestamp) setTime(data.timestamp);
return return;
} }
let formattedMessage = ''; let formattedMessage = '';
let messageColor: ColorSchemeType | undefined; let messageColor: ColorSchemeType | undefined;