From 2613acf00d4230a89fafcdac772f58283a518840 Mon Sep 17 00:00:00 2001 From: Rob Colbert Date: Fri, 8 May 2026 11:51:52 -0400 Subject: [PATCH] password_hash => password (display string); formatting --- gadget-code/frontend/src/pages/SignIn.tsx | 46 ++++++++++++++--------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/gadget-code/frontend/src/pages/SignIn.tsx b/gadget-code/frontend/src/pages/SignIn.tsx index fd30e1e..44d558c 100644 --- a/gadget-code/frontend/src/pages/SignIn.tsx +++ b/gadget-code/frontend/src/pages/SignIn.tsx @@ -1,27 +1,30 @@ -import { useState } from 'react'; -import { Link } from 'react-router-dom'; -import { api, AuthResponse, User } from '../lib/api'; -import GadgetGrid from '../components/GadgetGrid'; +import { useState } from "react"; +import { Link } from "react-router-dom"; +import { api, AuthResponse, User } from "../lib/api"; +import GadgetGrid from "../components/GadgetGrid"; interface SignInProps { onSuccess: (user: User, token: string) => void; } export default function SignIn({ onSuccess }: SignInProps) { - const [email, setEmail] = useState(''); - const [password, setPassword] = useState(''); - const [error, setError] = useState(''); + const [email, setEmail] = useState(""); + const [password, setPassword] = useState(""); + const [error, setError] = useState(""); const [loading, setLoading] = useState(false); const handleSubmit = async (e: React.FormEvent) => { e.preventDefault(); - setError(''); + setError(""); setLoading(true); try { - const response = await api.post('/auth/sign-in', { email, password }); + const response = await api.post("/auth/sign-in", { + email, + password, + }); onSuccess(response.user, response.token); } catch (err) { - setError(err instanceof Error ? err.message : 'Invalid credentials'); + setError(err instanceof Error ? err.message : "Invalid credentials"); } finally { setLoading(false); } @@ -36,11 +39,14 @@ export default function SignIn({ onSuccess }: SignInProps) {
-
// AUTHENTICATION REQUIRED
+
+ // AUTHENTICATION REQUIRED +
SYSTEM ACCESS
- +
- Accounts are administered. Contact your administrator for access. + Accounts are administered. Contact your administrator for + access.
{error && ( @@ -54,7 +60,10 @@ export default function SignIn({ onSuccess }: SignInProps) {
-
-