Made in Canada 🇨🇦 · ©2024 Rafaela Pitta

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 (

This page is password protected

setInput(e.target.value)} style={{ padding: "0.5rem", fontSize: "1rem", marginBottom: "1rem", width: "200px" }} />
); }