prettier cleanup

This commit is contained in:
Clément Le Bihan
2023-09-14 17:22:09 +02:00
parent aaaf73f632
commit 58d761c359
3 changed files with 5 additions and 6 deletions
+3 -3
View File
@@ -104,9 +104,9 @@ export default class API {
if (responseData.message) responseMessage = responseData.message; if (responseData.message) responseMessage = responseData.message;
} catch (e) { } catch (e) {
console.log(e); console.log(e);
throw new APIError(response.statusText, response.status, "unknownError"); throw new APIError(response.statusText, response.status, 'unknownError');
} }
throw new APIError(responseMessage, response.status, "unknownError"); throw new APIError(responseMessage, response.status, 'unknownError');
} }
return; return;
} }
@@ -118,7 +118,7 @@ export default class API {
try { try {
const jsonResponse = JSON.parse(body); const jsonResponse = JSON.parse(body);
if (!response.ok) { if (!response.ok) {
throw new APIError(response.statusText ?? body, response.status, "unknownError"); throw new APIError(response.statusText ?? body, response.status, 'unknownError');
} }
const validated = await handler.validator.validate(jsonResponse).catch((e) => { const validated = await handler.validator.validate(jsonResponse).catch((e) => {
if (e instanceof yup.ValidationError) { if (e instanceof yup.ValidationError) {
+1 -2
View File
@@ -24,7 +24,6 @@ export type PianoScoreInfo = {
streak: number; streak: number;
}; };
export enum NoteTiming { export enum NoteTiming {
Perfect = 'Perfect', Perfect = 'Perfect',
Great = 'Great', Great = 'Great',
@@ -43,4 +42,4 @@ export type PianoCanvasContext = {
// Timestamp of the play session, in miliseconds // Timestamp of the play session, in miliseconds
timestamp: number; timestamp: number;
pressedKeys: Map<number, number>; pressedKeys: Map<number, number>;
}; };
+1 -1
View File
@@ -32,7 +32,7 @@ import TextButton from '../components/TextButton';
import { MIDIAccess, MIDIMessageEvent, requestMIDIAccess } from '@motiz88/react-native-midi'; import { MIDIAccess, MIDIMessageEvent, requestMIDIAccess } from '@motiz88/react-native-midi';
import * as Linking from 'expo-linking'; import * as Linking from 'expo-linking';
import url from 'url'; import url from 'url';
import { PianoCanvasContext, PianoCanvasMsg, NoteTiming, PianoScoreInfo } from '../models/PianoGame'; import { PianoCanvasContext, PianoCanvasMsg, NoteTiming } from '../models/PianoGame';
type PlayViewProps = { type PlayViewProps = {
songId: number; songId: number;