prettier cleanup
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user