mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
code cleanup
This commit is contained in:
parent
606c88d777
commit
ef71e55543
23 changed files with 108 additions and 109 deletions
|
@ -4,8 +4,8 @@ import { persistStore, persistReducer } from 'redux-persist';
|
|||
import storage from 'redux-persist/lib/storage';
|
||||
import createSagaMiddleware from 'redux-saga';
|
||||
import { connectRouter } from 'connected-react-router'
|
||||
import userReducer from '$redux/user/reducer';
|
||||
import userSaga from '$redux/user/sagas';
|
||||
import userReducer from '~/redux/user/reducer';
|
||||
import userSaga from '~/redux/user/sagas';
|
||||
import { createBrowserHistory } from 'history';
|
||||
import { PersistConfig, Persistor } from "redux-persist/es/types";
|
||||
import { routerMiddleware } from 'connected-react-router'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { USER_ACTIONS } from "$redux/user/constants";
|
||||
import { IUserProfile } from "$redux/user/reducer";
|
||||
import { USER_ACTIONS } from "~/redux/user/constants";
|
||||
import { IUserProfile } from "~/redux/user/reducer";
|
||||
|
||||
export const userSendLoginRequest = ({
|
||||
username, password
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { api, authMiddleware } from "$utils/api";
|
||||
import { API } from "$constants/api";
|
||||
import { IApiUser } from "$redux/user/constants";
|
||||
import { api, authMiddleware } from "~/utils/api";
|
||||
import { API } from "~/constants/api";
|
||||
import { IApiUser } from "~/redux/user/constants";
|
||||
|
||||
export const apiUserLogin = (
|
||||
{ username, password }:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { createReducer } from 'reduxsauce';
|
||||
import * as ActionCreators from "$redux/user/actions";
|
||||
import { USER_ACTIONS } from "$redux/user/constants";
|
||||
import * as ActionCreators from "~/redux/user/actions";
|
||||
import { USER_ACTIONS } from "~/redux/user/constants";
|
||||
|
||||
export interface IUserProfile {
|
||||
id: number,
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { call, put, takeLatest } from 'redux-saga/effects';
|
||||
import { SagaIterator } from 'redux-saga';
|
||||
import { IApiUser, USER_ACTIONS, USER_ERRORS, USER_STATUSES } from "$redux/user/constants";
|
||||
import * as ActionCreators from '$redux/user/actions';
|
||||
import { apiUserLogin } from "$redux/user/api";
|
||||
import { userSetLoginError, userSetUser } from "$redux/user/actions";
|
||||
import { IApiUser, USER_ACTIONS, USER_ERRORS, USER_STATUSES } from "~/redux/user/constants";
|
||||
import * as ActionCreators from '~/redux/user/actions';
|
||||
import { apiUserLogin } from "~/redux/user/api";
|
||||
import { userSetLoginError, userSetUser } from "~/redux/user/actions";
|
||||
import { push } from 'connected-react-router'
|
||||
|
||||
function* sendLoginRequestSaga({ username, password }: ReturnType<typeof ActionCreators.userSendLoginRequest>): SagaIterator {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue