Skip to content

Commit 552c563

Browse files
committed
prettier all the things
1 parent 1203d90 commit 552c563

File tree

4 files changed

+26
-36
lines changed

4 files changed

+26
-36
lines changed

src/api.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export async function apiRequest(
1212
params: any,
1313
need_auth: boolean = true
1414
): Promise<Response> {
15-
var req: Promise<Response>| null = null;
15+
var req: Promise<Response> | null = null;
1616
if (method === "GET") {
1717
req = fetch(url + qs.stringify(params, { addQueryPrefix: true }), {
1818
credentials: need_auth ? "include" : "omit",

src/mixer/state.ts

+21-25
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import { Track, MYRADIO_NON_API_BASE, AuxItem } from "../api";
1313
import { AppThunk } from "../store";
1414
import { RootState } from "../rootReducer";
1515
import WaveSurfer from "wavesurfer.js";
16-
import CursorPlugin from 'wavesurfer.js/dist/plugin/wavesurfer.cursor.min.js';
17-
import RegionsPlugin from 'wavesurfer.js/dist/plugin/wavesurfer.regions.min.js';
16+
import CursorPlugin from "wavesurfer.js/dist/plugin/wavesurfer.cursor.min.js";
17+
import RegionsPlugin from "wavesurfer.js/dist/plugin/wavesurfer.regions.min.js";
1818
import * as later from "later";
1919
import NewsIntro from "../assets/audio/NewsIntro.wav";
2020
import NewsEndCountdown from "../assets/audio/NewsEndCountdown.wav";
@@ -385,20 +385,18 @@ export const load = (
385385
credentials: "include",
386386
} as any,
387387
plugins: [
388-
CursorPlugin.create(
389-
{
390-
showTime: true,
391-
opacity: 1,
392-
customShowTimeStyle: {
393-
'background-color': '#000',
394-
color: '#fff',
395-
padding: '2px',
396-
'font-size': '10px'
397-
}
398-
}
399-
),
400-
RegionsPlugin.create({})
401-
]
388+
CursorPlugin.create({
389+
showTime: true,
390+
opacity: 1,
391+
customShowTimeStyle: {
392+
"background-color": "#000",
393+
color: "#fff",
394+
padding: "2px",
395+
"font-size": "10px",
396+
},
397+
}),
398+
RegionsPlugin.create({}),
399+
],
402400
});
403401

404402
wavesurfer.on("ready", () => {
@@ -421,15 +419,13 @@ export const load = (
421419
wavesurfer.play();
422420
}
423421
if (state.loadedItem && "intro" in state.loadedItem) {
424-
wavesurfer.addRegion(
425-
{
426-
id: "intro",
427-
resize: false,
428-
start: 0,
429-
end: state.loadedItem.intro,
430-
color: 'rgba(125,0,255, 0.12)'
431-
}
432-
)
422+
wavesurfer.addRegion({
423+
id: "intro",
424+
resize: false,
425+
start: 0,
426+
end: state.loadedItem.intro,
427+
color: "rgba(125,0,255, 0.12)",
428+
});
433429
}
434430
});
435431
wavesurfer.on("play", () => {

src/wavesurfer-plugins.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
declare module "wavesurfer.js/dist/plugin/wavesurfer.cursor.min.js";
22

3-
declare module "wavesurfer.js/dist/plugin/wavesurfer.regions.min.js";
3+
declare module "wavesurfer.js/dist/plugin/wavesurfer.regions.min.js";

tsconfig.json

+3-9
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
{
22
"compilerOptions": {
33
"target": "es5",
4-
"lib": [
5-
"dom",
6-
"dom.iterable",
7-
"esnext"
8-
],
4+
"lib": ["dom", "dom.iterable", "esnext"],
95
"allowJs": true,
106
"skipLibCheck": true,
117
"esModuleInterop": true,
@@ -17,9 +13,7 @@
1713
"resolveJsonModule": true,
1814
"isolatedModules": true,
1915
"noEmit": true,
20-
"jsx": "react",
16+
"jsx": "react"
2117
},
22-
"include": [
23-
"src"
24-
]
18+
"include": ["src"]
2519
}

0 commit comments

Comments
 (0)