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