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

View File

@@ -104,9 +104,9 @@ export default class API {
if (responseData.message) responseMessage = responseData.message;
} catch (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;
}
@@ -118,7 +118,7 @@ export default class API {
try {
const jsonResponse = JSON.parse(body);
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) => {
if (e instanceof yup.ValidationError) {

View File

@@ -24,7 +24,6 @@ export type PianoScoreInfo = {
streak: number;
};
export enum NoteTiming {
Perfect = 'Perfect',
Great = 'Great',
@@ -43,4 +42,4 @@ export type PianoCanvasContext = {
// Timestamp of the play session, in miliseconds
timestamp: number;
pressedKeys: Map<number, number>;
};
};

View File

@@ -32,7 +32,7 @@ import TextButton from '../components/TextButton';
import { MIDIAccess, MIDIMessageEvent, requestMIDIAccess } from '@motiz88/react-native-midi';
import * as Linking from 'expo-linking';
import url from 'url';
import { PianoCanvasContext, PianoCanvasMsg, NoteTiming, PianoScoreInfo } from '../models/PianoGame';
import { PianoCanvasContext, PianoCanvasMsg, NoteTiming } from '../models/PianoGame';
type PlayViewProps = {
songId: number;