1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { getType } from "typesafe-actions";
6 import { Project } from "../models/project";
7 import actions, { ProjectAction } from "./project-action";
9 type ProjectState = Project[];
11 const projectsReducer = (state: ProjectState = [], action: ProjectAction) => {
12 switch (action.type) {
13 case getType(actions.createProject): {
14 return [...state, action.payload];
21 export default projectsReducer;