Spaces:
Build error
Build error
File size: 416 Bytes
494eeb9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import { createSlice } from '@reduxjs/toolkit'
import { useAuth0 } from '@auth0/auth0-react'
const authSlice = createSlice({
name: 'auth',
initialState: {
isAuthenticated: false
},
reducers: {
login(state) {
state.isAuthenticated = true
},
logout(state) {
state.isAuthenticated = false
}
}
})
export const { login, logout } = authSlice.actions
export default authSlice.reducer |