diff --git a/FrontendV2/src/App.tsx b/FrontendV2/src/App.tsx index 1f721c9..4854b1a 100644 --- a/FrontendV2/src/App.tsx +++ b/FrontendV2/src/App.tsx @@ -27,7 +27,7 @@ function App() { useEffect(() => { if (Cookies.get("token")) { const verifyToken = async () => { - const response = await fetch(`${API_BASE}/api/verifyToken`, { + const response = await fetch(`${API_BASE}/verify`, { method: "GET", headers: { Authorization: `Bearer ${Cookies.get("token")}`, diff --git a/FrontendV2/src/components/Header.tsx b/FrontendV2/src/components/Header.tsx index 41f85e8..8c7c7a6 100644 --- a/FrontendV2/src/components/Header.tsx +++ b/FrontendV2/src/components/Header.tsx @@ -64,7 +64,7 @@ export const Header = () => { return; } - const response = await fetch(`${API_BASE}/api/changePassword`, { + const response = await fetch(`${API_BASE}/api/users/change-password`, { method: "POST", headers: { "Content-Type": "application/json", diff --git a/FrontendV2/src/components/footer/versionInfo.query.ts b/FrontendV2/src/components/footer/versionInfo.query.ts index b41f238..2eda1b6 100644 --- a/FrontendV2/src/components/footer/versionInfo.query.ts +++ b/FrontendV2/src/components/footer/versionInfo.query.ts @@ -5,7 +5,7 @@ export const useVersionInfoQuery = () => useQuery({ queryKey: ["versionInfo"], queryFn: async () => { - const response = await fetch(`${API_BASE}/server-info`, { + const response = await fetch(`${API_BASE}/`, { method: "GET", }); if (response.ok) { diff --git a/FrontendV2/src/pages/HomePage.tsx b/FrontendV2/src/pages/HomePage.tsx index 45f4410..8206d5f 100644 --- a/FrontendV2/src/pages/HomePage.tsx +++ b/FrontendV2/src/pages/HomePage.tsx @@ -7,6 +7,8 @@ import { Spinner, VStack, Table, + InputGroup, + Span, } from "@chakra-ui/react"; import { useAtom } from "jotai"; import { getBorrowableItems } from "@/utils/Fetcher"; @@ -31,6 +33,9 @@ export const HomePage = () => { const [isLoadingA, setIsLoadingA] = useState(false); const [selectedItems, setSelectedItems] = useState([]); + const MAX_CHARACTERS = 500; + const [note, setNote] = useState(""); + // Error handling states const [isMsg, setIsMsg] = useState(false); const [msgStatus, setMsgStatus] = useState<"error" | "success">("error"); @@ -136,13 +141,29 @@ export const HomePage = () => { ))} + + {note.length} / {MAX_CHARACTERS} + + } + > + { + setNote(e.currentTarget.value.slice(0, MAX_CHARACTERS)); + }} + /> + )} {selectedItems.length >= 1 && (