import { Redirect, RouteProps } from "react-router";
import * as React from "react";
import { connect, DispatchProp } from "react-redux";
-import authActions, { getUserDetails } from "../../store/auth-action";
+import authActions, { getUserDetails } from "../../store/auth/auth-action";
interface ApiTokenProps {
}
import configureStore from "./store/store";
import { ConnectedRouter } from "react-router-redux";
import ApiToken from "./components/api-token/api-token";
-import authActions from "./store/auth-action";
+import authActions from "./store/auth/auth-action";
const history = createBrowserHistory();
const store = configureStore({
//
// SPDX-License-Identifier: AGPL-3.0
-import { serverApi } from "../common/server-api";
+import { serverApi } from "../../common/server-api";
import { ofType, default as unionize, UnionOf } from "unionize";
import { Dispatch } from "redux";
// SPDX-License-Identifier: AGPL-3.0
import actions, { AuthAction, UserDetailsResponse } from "./auth-action";
-import { User } from "../models/user";
-import { authService } from "../services/services";
-import { removeServerApiAuthorizationHeader, setServerApiAuthorizationHeader } from "../common/server-api";
+import { User } from "../../models/user";
+import { authService } from "../../services/services";
+import { removeServerApiAuthorizationHeader, setServerApiAuthorizationHeader } from "../../common/server-api";
export interface AuthState {
user?: User;
//
// SPDX-License-Identifier: AGPL-3.0
-import { Project } from "../models/project";
+import { Project } from "../../models/project";
import { default as unionize, ofType, UnionOf } from "unionize";
const actions = unionize({
//
// SPDX-License-Identifier: AGPL-3.0
-import { Project } from "../models/project";
+import { Project } from "../../models/project";
import actions, { ProjectAction } from "./project-action";
export type ProjectState = Project[];
+++ /dev/null
-// Copyright (C) The Arvados Authors. All rights reserved.
-//
-// SPDX-License-Identifier: AGPL-3.0
-
-import { combineReducers } from "redux";
-import { routerReducer, RouterState } from "react-router-redux";
-import authReducer, { AuthState } from "./auth-reducer";
-import projectsReducer, { ProjectState } from "./project-reducer";
-
-export interface RootState {
- auth: AuthState,
- projects: ProjectState,
- router: RouterState
-}
-
-const rootReducer = combineReducers({
- auth: authReducer,
- projects: projectsReducer,
- router: routerReducer
-});
-
-export default rootReducer;
//
// SPDX-License-Identifier: AGPL-3.0
-import { createStore, applyMiddleware, compose, Middleware } from 'redux';
-import { default as rootReducer, RootState } from "./root-reducer";
-import { routerMiddleware } from "react-router-redux";
+import { createStore, applyMiddleware, compose, Middleware, combineReducers } from 'redux';
+import { routerMiddleware, routerReducer, RouterState } from "react-router-redux";
import thunkMiddleware from 'redux-thunk';
import { History } from "history";
+import projectsReducer, { ProjectState } from "./project/project-reducer";
+import authReducer, { AuthState } from "./auth/auth-reducer";
const composeEnhancers =
(process.env.NODE_ENV === 'development' &&
window && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) ||
compose;
+export interface RootState {
+ auth: AuthState,
+ projects: ProjectState,
+ router: RouterState
+}
+
+const rootReducer = combineReducers({
+ auth: authReducer,
+ projects: projectsReducer,
+ router: routerReducer
+});
+
+
export default function configureStore(initialState: RootState, history: History) {
const middlewares: Middleware[] = [
routerMiddleware(history),
import { connect, DispatchProp } from "react-redux";
import Tree from "../../components/tree/tree";
import { Project } from "../../models/project";
-import { RootState } from "../../store/root-reducer";
import ProjectList from "../../components/project-list/project-list";
import { Route, Switch } from "react-router";
import { Link } from "react-router-dom";
import Button from "@material-ui/core/Button/Button";
-import authActions from "../../store/auth-action";
+import authActions from "../../store/auth/auth-action";
import IconButton from "@material-ui/core/IconButton/IconButton";
import Menu from "@material-ui/core/Menu/Menu";
import MenuItem from "@material-ui/core/MenuItem/MenuItem";
import { AccountCircle } from "@material-ui/icons";
import { User } from "../../models/user";
import Grid from "@material-ui/core/Grid/Grid";
+import { RootState } from "../../store/store";
const drawerWidth = 240;