update tutorial builder
- update tutorial modell - add difficulty closes #82 - add review system - make tutorials private by default - add admin overview
This commit is contained in:
@@ -10,6 +10,9 @@ import {
|
||||
BUILDER_CHANGE_STEP,
|
||||
BUILDER_CHANGE_ORDER,
|
||||
BUILDER_DELETE_PROPERTY,
|
||||
BUILDER_DIFFICULTY,
|
||||
BUILDER_PUBLIC,
|
||||
BUILDER_REVIEW,
|
||||
} from "../actions/types";
|
||||
|
||||
const initialState = {
|
||||
@@ -17,6 +20,9 @@ const initialState = {
|
||||
progress: false,
|
||||
json: "",
|
||||
title: "",
|
||||
difficulty: 0,
|
||||
public: false,
|
||||
review: false,
|
||||
id: "",
|
||||
steps: [
|
||||
{
|
||||
@@ -45,6 +51,21 @@ export default function foo(state = initialState, action) {
|
||||
...state,
|
||||
title: action.payload,
|
||||
};
|
||||
case BUILDER_PUBLIC:
|
||||
return {
|
||||
...state,
|
||||
public: action.payload,
|
||||
};
|
||||
case BUILDER_DIFFICULTY:
|
||||
return {
|
||||
...state,
|
||||
difficulty: action.payload,
|
||||
};
|
||||
case BUILDER_REVIEW:
|
||||
return {
|
||||
...state,
|
||||
review: action.payload,
|
||||
};
|
||||
case BUILDER_ID:
|
||||
return {
|
||||
...state,
|
||||
|
||||
Reference in New Issue
Block a user