Prettier support

This commit is contained in:
2021-03-10 21:14:32 -06:00
parent c51b527707
commit 0924490a6f
99 changed files with 5504 additions and 3979 deletions

View File

@@ -1,9 +1,10 @@
import {createReducer} from '@reduxjs/toolkit';
import { createReducer } from '@reduxjs/toolkit';
import {
setAllowDownload,
SET_DOWNLOAD_BEGIN,
setAllowDownload,
setDownloadEnd,
setDownloadProgress
setDownloadProgress,
} from '../actions/download_actions';
const defaultDownloadState = {
@@ -17,37 +18,37 @@ const defaultDownloadState = {
DownloadType: null,
};
export const downloadReducer = createReducer({
...defaultDownloadState,
AllowDownload: false,
}, {
[setAllowDownload]: (state, action) => {
return {
...state,
AllowDownload: action.payload,
};
export const downloadReducer = createReducer(
{
...defaultDownloadState,
AllowDownload: false,
},
[SET_DOWNLOAD_BEGIN]: (state, action) => {
return {
...state,
...defaultDownloadState,
DownloadActive: true,
DownloadName: action.payload.name,
DownloadType: action.payload.type,
DownloadURL: action.payload.url,
}
},
[setDownloadEnd]: (state, action) => {
return {
...state,
...defaultDownloadState,
DownloadResult: action.payload,
};
},
[setDownloadProgress]: (state, action) => {
return {
...state,
DownloadProgress: action.payload,
}
{
[setAllowDownload]: (state, action) => {
return {
...state,
AllowDownload: action.payload,
};
},
[SET_DOWNLOAD_BEGIN]: (state, action) => {
return {
...state,
...defaultDownloadState,
DownloadActive: true,
DownloadName: action.payload.name,
DownloadType: action.payload.type,
DownloadURL: action.payload.url,
};
},
[setDownloadEnd]: (state, action) => {
return {
...state,
...defaultDownloadState,
DownloadResult: action.payload,
};
},
[setDownloadProgress]: (state, action) => {
return { ...state, DownloadProgress: action.payload };
},
}
});
);