mirror of
https://github.com/lemeow125/StudE-Frontend.git
synced 2025-05-17 03:48:06 +08:00
Fixed login and revalidation page
This commit is contained in:
parent
9a246b45e1
commit
90f227a2c0
4 changed files with 19 additions and 19 deletions
|
@ -1,9 +1,9 @@
|
|||
import { createSlice } from "@reduxjs/toolkit";
|
||||
|
||||
export const UserSlice = createSlice({
|
||||
name: "Auth",
|
||||
name: "User",
|
||||
initialState: {
|
||||
creds: {
|
||||
user: {
|
||||
email: "",
|
||||
uid: "",
|
||||
username: "",
|
||||
|
@ -17,7 +17,7 @@ export const UserSlice = createSlice({
|
|||
},
|
||||
reducers: {
|
||||
setUser: (state, action) => {
|
||||
state.creds = {
|
||||
state.user = {
|
||||
email: action.payload.email,
|
||||
uid: action.payload.uid,
|
||||
username: action.payload.username,
|
||||
|
@ -30,7 +30,7 @@ export const UserSlice = createSlice({
|
|||
};
|
||||
},
|
||||
clear: (state) => {
|
||||
state.creds = {
|
||||
state.user = {
|
||||
email: "",
|
||||
uid: "",
|
||||
username: "",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue