Skip to content

Commit

Permalink
chaged state to string:
Browse files Browse the repository at this point in the history
  • Loading branch information
rachaelch3n committed Nov 20, 2024
1 parent b32b6d2 commit a542f70
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/(auth)/signup/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export default function SignUpLayout() {
function SignUp() {
const { signUp } = useAuth();
const [email, setEmail] = useState('');
const [password, setPassword] = useState<string | null>(null);
const [confirmPassword, setConfirmPassword] = useState<string | null>(null);
const [password, setPassword] = useState<string>('');
const [confirmPassword, setConfirmPassword] = useState<string>('');
const [passwordError, setPasswordError] = useState('');
const [passwordComplexityError, setPasswordComplexityError] = useState<
string | null
Expand Down Expand Up @@ -122,7 +122,7 @@ function SignUp() {
password={password || ''} // Set default value if password is null
/>
{/* Password complexity requirements */}
{password && passwordComplexity === false && passwordComplexityError && (
{password && !passwordComplexity && passwordComplexityError && (
<p style={{ color: 'red' }}>{passwordComplexityError}</p>
)}
{/* Password complexity error message */}
Expand Down

0 comments on commit a542f70

Please sign in to comment.