Spaces:
Build error
Build error
Download src/features/auth/authSlice.ts from danoverd21/Next-Test-App: direct link, hf CLI and curl.
- Browser
- Download file 416 Bytes
-
https://huggingface.co/spaces/danoverd21/Next-Test-App/resolve/main/src/features/auth/authSlice.ts
- Command line
-
hf download hf://spaces/danoverd21/Next-Test-App/src/features/auth/authSlice.ts
-
curl -L -o authSlice.ts https://huggingface.co/spaces/danoverd21/Next-Test-App/resolve/main/src/features/auth/authSlice.ts
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 |