diff --git a/src/Components/LoginModal/LoginModal.tsx b/src/Components/LoginModal/LoginModal.tsx index 85a70ad..e5f9d34 100644 --- a/src/Components/LoginModal/LoginModal.tsx +++ b/src/Components/LoginModal/LoginModal.tsx @@ -12,7 +12,7 @@ import Button from "../Buttons/Button"; import { useNavigate } from "react-router-dom"; import { LoginAPI } from "../API/API"; import { useDispatch } from "react-redux"; -import { Toggle_Login } from "../Plugins/Redux/Slices/AuthSlice/AuthSlice"; +import { auth_toggle } from "../Plugins/Redux/Slices/AuthSlice/AuthSlice"; export default function LoginModal() { const navigate = useNavigate(); const [showPassword, setShowPassword] = useState(false); @@ -128,7 +128,7 @@ export default function LoginModal() { onClick={async () => { const status = await LoginAPI(user); if (status === true) { - await dispatch(Toggle_Login()); + await dispatch(auth_toggle()); navigate("/dashboard"); } else { setError("Invalid login"); diff --git a/src/Components/Plugins/Redux/Slices/AuthSlice/AuthSlice.tsx b/src/Components/Plugins/Redux/Slices/AuthSlice/AuthSlice.tsx index 691a08e..bab1c91 100644 --- a/src/Components/Plugins/Redux/Slices/AuthSlice/AuthSlice.tsx +++ b/src/Components/Plugins/Redux/Slices/AuthSlice/AuthSlice.tsx @@ -7,13 +7,13 @@ export const AuthSlice = createSlice({ value: false, }, reducers: { - Toggle_Login: (state) => { + auth_toggle: (state) => { state.value = !state.value; }, }, }); // Action creators are generated for each case reducer function -export const { Toggle_Login } = AuthSlice.actions; +export const { auth_toggle } = AuthSlice.actions; export default AuthSlice.reducer;