export default function LoginButton(_props: { buttonClassName?: string; size?: string }) { // Deactivating until I have proper Atproto login support return null; } // import { useIssueTracker } from "@thorium/components/useIssueTracker"; // import Logo from "@thorium/images/logo.svg?url"; // import Button from "@thorium/ui/Button"; // import { popoverTransitionClasses } from "@thorium/ui/Dropdown"; // import { useEffect, useRef, useState } from "react"; // import { Menu, MenuItem, MenuTrigger, Popover, Button as RAButton } from "react-aria-components"; // import { useThoriumAccount } from "../context/ThoriumAccountContext"; // import { Icon } from "./ui/Icon"; // // https://stackoverflow.com/a/16861050/4697675 // const popupCenter = ({ // url, // title, // w, // h, // }: { // url: string; // title: string; // w: number; // h: number; // }) => { // // Fixes dual-screen position Most browsers Firefox // const dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : window.screenX; // const dualScreenTop = window.screenTop !== undefined ? window.screenTop : window.screenY; // const width = window.innerWidth // ? window.innerWidth // : document.documentElement.clientWidth // ? document.documentElement.clientWidth // : window.screen.width; // const height = window.innerHeight // ? window.innerHeight // : document.documentElement.clientHeight // ? document.documentElement.clientHeight // : window.screen.height; // const systemZoom = width / window.screen.availWidth; // const left = (width - w) / 2 / systemZoom + dualScreenLeft; // const top = (height - h) / 2 / systemZoom + dualScreenTop; // const newWindow = window.open( // url, // title, // ` // scrollbars=yes, // width=${w / systemZoom}, // height=${h / systemZoom}, // top=${top}, // left=${left} // `, // ); // newWindow?.focus(); // return newWindow; // }; // function AccountMenu({ size = "md" }) { // const { account, logout } = useThoriumAccount(); // const { setOpen } = useIssueTracker(); // const [noImg, setNoImg] = useState(!account?.profilePictureUrl); // if (!account) return null; // return ( // // // {noImg ? ( // // ) : ( // setNoImg(true)} // /> // )} // // // // { // setOpen(true); // }} // > // Issue Tracker // // logout()} // > // Logout // // // // // ); // } // export default function LoginButton({ // buttonClassName = "btn-ghost btn-sm", // size = "md", // }: { // buttonClassName?: string; // size?: string; // }) { // const { login, account, verificationUrl, verifying } = useThoriumAccount(); // const linkRef = useRef(null); // const windowRef = useRef(null); // useEffect(() => { // if (verificationUrl) { // if (!windowRef.current) { // windowRef.current = popupCenter({ // url: verificationUrl, // title: "Verify your account", // w: 500, // h: 500, // }); // } // // linkRef.current?.click(); // } // }, [verificationUrl]); // useEffect(() => { // if (windowRef.current) { // windowRef.current.close(); // windowRef.current = null; // } // }, [account]); // return ( // // // {" "} // // {!account || verifying ? ( // { // login(); // }} // > // {verifying ? "Verifying..." : "Login to Thorium"} // // ) : null} // {account && } // // ); // }