From 1e20e6f50fa8841223c7d95cbfeae6a3c5c30b00 Mon Sep 17 00:00:00 2001
From: Nate Sawant <74106957+natesawant@users.noreply.github.com>
Date: Fri, 8 Dec 2023 16:23:51 -0500
Subject: [PATCH] Minor changes (#53)
* Remove notification icon
* Fix password hiding
* Fix add address button size
* Temp disable delete button
* Remove unused import
---
frontend/src/components/Navbar/Navbar.tsx | 5 +----
frontend/src/components/Profile/EditAddresses.tsx | 6 +++---
.../src/components/Registration/TextQuestion.tsx | 3 +++
frontend/src/pages/Profile.tsx | 5 +++--
frontend/src/pages/Registration.tsx | 15 ++++++++++++---
.../src/utilities/FormQuestions/registration.ts | 2 +-
6 files changed, 23 insertions(+), 13 deletions(-)
diff --git a/frontend/src/components/Navbar/Navbar.tsx b/frontend/src/components/Navbar/Navbar.tsx
index bc79137..9425001 100644
--- a/frontend/src/components/Navbar/Navbar.tsx
+++ b/frontend/src/components/Navbar/Navbar.tsx
@@ -1,7 +1,6 @@
import { Fab, Link } from "@mui/material";
import { useState } from "react";
import NavDropDown from "./Dropdown/NavDropDown";
-import NotifactionIcon from "../../assets/navbar/notifaction.png";
import ProfileIcon from "../../assets/navbar/profile.png";
import { useStateSelector } from "../../hooks/use-redux";
import router from "../../router";
@@ -30,9 +29,7 @@ export default function NavBar() {
Create a Job
)}
-
-
-
+
) => void;
}) {
const [currentAddresses, setCurrentAddresses] = React.useState(
- props.addresses ? props.addresses.map((a: Address) => ({ ...a })) : [],
+ props.addresses ? props.addresses.map((a: Address) => ({ ...a })) : []
);
const section: string = "addresses";
@@ -94,7 +94,7 @@ export default function EditAddresses(props: {
{
@@ -123,7 +123,7 @@ export default function EditAddresses(props: {
display={currentAddresses[props.index]?.name || "Add New Address"}
onChange={(delta: number) => {
props.setSection(
- props.index + delta === currentAddresses.length ? section : "",
+ props.index + delta === currentAddresses.length ? section : ""
);
props.setIndex(props.index + delta);
}}
diff --git a/frontend/src/components/Registration/TextQuestion.tsx b/frontend/src/components/Registration/TextQuestion.tsx
index bdd5a81..c90ad5b 100644
--- a/frontend/src/components/Registration/TextQuestion.tsx
+++ b/frontend/src/components/Registration/TextQuestion.tsx
@@ -5,9 +5,11 @@ import { TextField } from "@mui/material";
export default function TextQuestion({
question,
control,
+ password,
}: {
question: FormQuestion;
control: Control;
+ password?: boolean;
}) {
return (
onChange(e.target.value)}
label={question.prompt}
variant="outlined"
diff --git a/frontend/src/pages/Profile.tsx b/frontend/src/pages/Profile.tsx
index bc4683d..9918827 100644
--- a/frontend/src/pages/Profile.tsx
+++ b/frontend/src/pages/Profile.tsx
@@ -29,7 +29,7 @@ function Profile(props: { state: UserSliceState }) {
const { addError, setOpen } = useApiError();
const dispatch = useDispatch();
const [pageStatus, setPageStatus] = React.useState(
- PageStatus.Loading,
+ PageStatus.Loading
);
const [addressIndex, setAddressIndex] = React.useState(0);
const [printerIndex, setPrinterIndex] = React.useState(0);
@@ -70,7 +70,7 @@ function Profile(props: { state: UserSliceState }) {
csrfToken: props.state.csrfToken,
ssoAccessToken: props.state.ssoAccessToken,
user: user,
- }),
+ })
);
setSectionEdit("");
})
@@ -118,6 +118,7 @@ function Profile(props: { state: UserSliceState }) {
Deactivate Account
{
diff --git a/frontend/src/pages/Registration.tsx b/frontend/src/pages/Registration.tsx
index ed2f0eb..7fca320 100644
--- a/frontend/src/pages/Registration.tsx
+++ b/frontend/src/pages/Registration.tsx
@@ -26,7 +26,7 @@ import { useApiError } from "../hooks/use-api-error.tsx";
const producerQuestions = allQuestions.sections;
const designerQuestions = allQuestions.sections.filter(
- (section) => section.userType?.toLowerCase() !== "producer",
+ (section) => section.userType?.toLowerCase() !== "producer"
);
const QuestionForm = () => {
@@ -49,10 +49,10 @@ const QuestionForm = () => {
const [login] = authApi.useLoginMutation();
const dispatch = useStateDispatch();
const [totalSections, setTotalSections] = useState(
- allQuestions.sections.length,
+ allQuestions.sections.length
);
const [questions, setQuestions] = useState(
- allQuestions.sections,
+ allQuestions.sections
);
const { addError, setOpen } = useApiError();
@@ -216,6 +216,15 @@ const QuestionForm = () => {
control={control}
/>
);
+ case "password":
+ return (
+
+ );
case "dropdown":
return (