import * as React from "react";
import { useState } from "react";
export function PasswordGate({ passwordRequired, password }) {
const [input, setInput] = useState("");
const [unlocked, setUnlocked] = useState(false);
// If no password is required, unlock immediately
if (!passwordRequired) {
return null; // This hides the gate entirely
}
if (unlocked) {
return null; // Also hide the gate if already unlocked
}
return (