mirror of
https://github.com/lemeow125/Borrowing-TrackerFrontend.git
synced 2025-05-18 20:38:14 +08:00
Improved registration and activation functionality
This commit is contained in:
parent
8a2c702da3
commit
742a1af9f8
7 changed files with 111 additions and 5 deletions
|
@ -121,7 +121,7 @@ export async function UserAPI() {
|
|||
export function ActivationAPI(activation: ActivationType) {
|
||||
return instance
|
||||
.post("api/v1/accounts/users/activation/", activation)
|
||||
.then(async () => {
|
||||
.then(() => {
|
||||
console.log("Activation Success");
|
||||
return true;
|
||||
})
|
||||
|
|
|
@ -9,7 +9,7 @@ import { useDispatch } from "react-redux";
|
|||
import { auth_toggle } from "../Plugins/Redux/Slices/AuthSlice/AuthSlice";
|
||||
import { toast } from "react-toastify";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
export default function Sidebar() {
|
||||
export default function Drawer() {
|
||||
const user = useQuery({ queryKey: ["user"], queryFn: UserAPI });
|
||||
const dispatch = useDispatch();
|
||||
const navigate = useNavigate();
|
|
@ -1,7 +1,7 @@
|
|||
import { useState } from "react";
|
||||
import styles, { colors } from "../../styles";
|
||||
import MenuIcon from "@mui/icons-material/Menu";
|
||||
import SidebarModal from "../Sidebar/Sidebar";
|
||||
import SidebarModal from "../Drawer/Drawer";
|
||||
import { Drawer } from "@mui/material";
|
||||
export interface props {
|
||||
label: string;
|
||||
|
|
|
@ -29,7 +29,11 @@ export default function LoginModal() {
|
|||
<div
|
||||
style={{
|
||||
...styles.flex_row,
|
||||
...{ alignItems: "center", justifyContent: "center" },
|
||||
...{
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
overflowY: "scroll",
|
||||
},
|
||||
}}
|
||||
>
|
||||
<LoginIcon
|
||||
|
|
|
@ -29,7 +29,11 @@ export default function RegisterModal() {
|
|||
<div
|
||||
style={{
|
||||
...styles.flex_row,
|
||||
...{ alignItems: "center", justifyContent: "center" },
|
||||
...{
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
overflowY: "scroll",
|
||||
},
|
||||
}}
|
||||
>
|
||||
<AppRegistration
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue