summaryrefslogtreecommitdiff
path: root/src/features/auth/authSlice.ts
diff options
context:
space:
mode:
authorMichael Hunteman <michael@huntm.net>2024-05-17 15:20:30 -0700
committerMichael Hunteman <michael@huntm.net>2024-05-17 15:20:30 -0700
commit7103019890960e793deefb64987a09b33be60b42 (patch)
treec1c9402aa250c68b2cbe13d62598232bbf20b1e2 /src/features/auth/authSlice.ts
parentfc5c111bcfe296bec82e1cf9fdb88fc80fb24f89 (diff)
Add golang server
Diffstat (limited to 'src/features/auth/authSlice.ts')
-rw-r--r--src/features/auth/authSlice.ts26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/features/auth/authSlice.ts b/src/features/auth/authSlice.ts
deleted file mode 100644
index bff2bdd..0000000
--- a/src/features/auth/authSlice.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-import { createSlice } from '@reduxjs/toolkit';
-import type { RootState } from '../../store';
-import type { Guest } from '../../apiSlice';
-
-type AuthState = {
- guest?: Guest;
- token?: string;
-};
-
-const authSlice = createSlice({
- name: 'auth',
- initialState: { guest: undefined, token: undefined } as AuthState,
- reducers: {
- setCredentials: (state, action) => {
- const { guest, token } = action.payload;
- state.guest = guest;
- state.token = token;
- },
- },
-});
-
-export const { setCredentials } = authSlice.actions;
-
-export default authSlice.reducer;
-
-export const selectCurrentGuest = (state: RootState) => state.auth.guest;