mirror of
https://github.com/rjNemo/devbook_ts
synced 2026-06-06 02:36:39 +00:00
refactor: delete useless store/auth folder
This commit is contained in:
parent
829668c00f
commit
bd534b27d9
1 changed files with 0 additions and 36 deletions
|
|
@ -1,36 +0,0 @@
|
|||
// Redux
|
||||
import {createSlice} from '@reduxjs/toolkit';
|
||||
// Typing
|
||||
import User from '../../models/User';
|
||||
|
||||
interface SliceState {
|
||||
isAuthenticated: boolean;
|
||||
loading: boolean;
|
||||
user: User | null;
|
||||
error: string | null;
|
||||
}
|
||||
|
||||
const initialState: SliceState = {
|
||||
isAuthenticated: false,
|
||||
loading: true,
|
||||
user: null,
|
||||
error: null,
|
||||
};
|
||||
|
||||
const authSlice = createSlice({
|
||||
name: 'auth',
|
||||
initialState,
|
||||
reducers: {},
|
||||
});
|
||||
|
||||
// export actions
|
||||
export const {} = authSlice.actions;
|
||||
|
||||
// export selectors
|
||||
// export const selectAuthState = (state: RootState) => {
|
||||
// const {isAuthenticated, loading} = state.auth;
|
||||
// return {isAuthenticated, loading};
|
||||
// };
|
||||
|
||||
// export reducer
|
||||
export default authSlice.reducer;
|
||||
Loading…
Reference in a new issue