mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
ImageUpload (first attmpt)
This commit is contained in:
parent
75fb88b209
commit
af3b413903
8 changed files with 179 additions and 4 deletions
|
@ -1,7 +1,9 @@
|
|||
import { createReducer } from "~/utils/reducer";
|
||||
import { INode } from "../types";
|
||||
import {EMPTY_BLOCK, EMPTY_NODE} from "./constants";
|
||||
import { EMPTY_BLOCK, EMPTY_NODE } from "./constants";
|
||||
import { NODE_HANDLERS } from "./handlers";
|
||||
import { EMPTY_FILE } from "../uploads/constants";
|
||||
import uuid from 'uuid4';
|
||||
|
||||
export type INodeState = Readonly<{
|
||||
is_loading: boolean;
|
||||
|
@ -16,7 +18,8 @@ const INITIAL_STATE: INodeState = {
|
|||
type: 'image',
|
||||
blocks: [
|
||||
{ ...EMPTY_BLOCK, type: 'image' },
|
||||
]
|
||||
],
|
||||
files: [{ ...EMPTY_FILE, id: uuid() }, { ...EMPTY_FILE, id: uuid() }]
|
||||
},
|
||||
is_loading: false,
|
||||
error: null,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue