1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

node and upload reducer

This commit is contained in:
muerwre 2019-08-06 18:32:51 +07:00
parent e0bba90d2e
commit 5045fbce8b
11 changed files with 87 additions and 19 deletions

View file

@ -0,0 +1,3 @@
export const UPLOAD_HANDLERS = {
}

View file

@ -0,0 +1,20 @@
import { createReducer } from "~/utils/reducer";
import { IFile } from "~/constants/cells";
import { UUID } from "../types";
import { UPLOAD_HANDLERS } from "./handlers";
export interface IUploadStatus {
progress: number; is_loading: boolean; error: string;
}
export interface IUploadState {
files: Record<UUID, IFile>;
statuses: Record<UUID, IUploadStatus>;
}
const INITIAL_STATE = {
files: {},
statuses: {},
};
export default createReducer(INITIAL_STATE, UPLOAD_HANDLERS);

View file

@ -0,0 +1,3 @@
export default function* () {
}