Reformat code with Prettier's new rules.
This commit is contained in:
@@ -4,7 +4,7 @@ export const albumViewReducer = (
|
||||
previousState = {
|
||||
grid: true,
|
||||
},
|
||||
payload
|
||||
payload,
|
||||
) => {
|
||||
const { type } = payload
|
||||
switch (type) {
|
||||
|
||||
@@ -24,7 +24,7 @@ export const shareDialogReducer = (
|
||||
resource: '',
|
||||
name: '',
|
||||
},
|
||||
payload
|
||||
payload,
|
||||
) => {
|
||||
const { type, ids, resource, name, label } = payload
|
||||
switch (type) {
|
||||
@@ -52,7 +52,7 @@ export const addToPlaylistDialogReducer = (
|
||||
open: false,
|
||||
duplicateSong: false,
|
||||
},
|
||||
payload
|
||||
payload,
|
||||
) => {
|
||||
const { type } = payload
|
||||
switch (type) {
|
||||
@@ -82,7 +82,7 @@ export const downloadMenuDialogReducer = (
|
||||
previousState = {
|
||||
open: false,
|
||||
},
|
||||
payload
|
||||
payload,
|
||||
) => {
|
||||
const { type } = payload
|
||||
switch (type) {
|
||||
@@ -125,7 +125,7 @@ export const expandInfoDialogReducer = (
|
||||
previousState = {
|
||||
open: false,
|
||||
},
|
||||
payload
|
||||
payload,
|
||||
) => {
|
||||
const { type } = payload
|
||||
switch (type) {
|
||||
@@ -149,7 +149,7 @@ export const listenBrainzTokenDialogReducer = (
|
||||
previousState = {
|
||||
open: false,
|
||||
},
|
||||
payload
|
||||
payload,
|
||||
) => {
|
||||
const { type } = payload
|
||||
switch (type) {
|
||||
|
||||
@@ -55,7 +55,7 @@ const mapToAudioLists = (item) => {
|
||||
updatedAt: item.updatedAt,
|
||||
album: item.album,
|
||||
},
|
||||
300
|
||||
300,
|
||||
),
|
||||
}
|
||||
}
|
||||
@@ -140,7 +140,7 @@ const reduceSyncQueue = (state, { data: { audioInfo, audioLists } }) => {
|
||||
const reduceCurrent = (state, { data }) => {
|
||||
const current = data.ended ? {} : data
|
||||
const savedPlayIndex = state.queue.findIndex(
|
||||
(item) => item.uuid === current.uuid
|
||||
(item) => item.uuid === current.uuid,
|
||||
)
|
||||
return {
|
||||
...state,
|
||||
|
||||
@@ -18,7 +18,7 @@ const initialState = {
|
||||
|
||||
export const replayGainReducer = (
|
||||
previousState = initialState,
|
||||
{ type, payload }
|
||||
{ type, payload },
|
||||
) => {
|
||||
switch (type) {
|
||||
case CHANGE_GAIN: {
|
||||
|
||||
@@ -5,14 +5,14 @@ import themes from '../themes'
|
||||
const defaultTheme = () => {
|
||||
return (
|
||||
Object.keys(themes).find(
|
||||
(t) => themes[t].themeName === config.defaultTheme
|
||||
(t) => themes[t].themeName === config.defaultTheme,
|
||||
) || 'DarkTheme'
|
||||
)
|
||||
}
|
||||
|
||||
export const themeReducer = (
|
||||
previousState = defaultTheme(),
|
||||
{ type, payload }
|
||||
{ type, payload },
|
||||
) => {
|
||||
if (type === CHANGE_THEME) {
|
||||
return payload
|
||||
|
||||
Reference in New Issue
Block a user