danoverd21's picture
Add 13 files
494eeb9 verified
raw
history blame contribute delete
416 Bytes
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