File size: 1,545 Bytes
2728a40
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
export default function AuthLayout({ mode, onSwitchMode, children }) {
  const isForgot = mode === "forgot";

  return (
    <div className="auth-shell">
      <div className="auth-card">
        <div className="auth-header">
          <div className="brand-block">
            <div className="brand-mark">T</div>
            <div>
              <h1>TradeMind</h1>
              <p>
                {isForgot
                  ? "Password recovery"
                  : mode === "signin"
                  ? "Sign in to your account"
                  : "Create an account"}
              </p>
            </div>
          </div>

          {/* Hide tab switcher on the forgot-password screen */}
          {!isForgot && (
            <div className="auth-tabs" role="tablist" aria-label="Authentication mode">
              <button
                type="button"
                role="tab"
                aria-selected={mode === "signin"}
                className={`tab ${mode === "signin" ? "active" : ""}`}
                onClick={() => onSwitchMode("signin")}
              >
                Sign In
              </button>
              <button
                type="button"
                role="tab"
                aria-selected={mode === "signup"}
                className={`tab ${mode === "signup" ? "active" : ""}`}
                onClick={() => onSwitchMode("signup")}
              >
                Sign Up
              </button>
            </div>
          )}
        </div>
        {children}
      </div>
    </div>
  );
}