We couldnt send the email. Please try again!
),
type: "error",
});
} finally {
setLoading(false);
}
};
const handleCodeSubmit = async (code: string) => {
if (!tokenId) return;
setLoading(true);
const confirmedToken = await confirmEmailAuthToken(tokenId, code);
if (!confirmedToken) {
setLoading(false);
toaster({
content:
{state === "log in" ? (
<>
Log in with
Atmosphere account
What's the Atmosphere?
}
/>
}
loading={loading}
onSubmit={(handle) => {
setLoading(true);
let redirectUrl: string;
if (props.redirectRoute) {
redirectUrl = props.redirectRoute;
} else {
let url = new URL(window.location.href);
url.searchParams.set("refreshAuth", "");
redirectUrl = url.toString();
}
window.location.href = `/api/oauth/login?handle=${encodeURIComponent(handle)}&redirect_url=${encodeURIComponent(redirectUrl)}`;
}}
/>
{props.noEmailLogin ? null : (
<>
>
)}
>
) : state === "email log in" ? (
) : state === "email confirm" ? (
setState("email log in")}
/>
) : (
Leaflet is part of
the Atmosphere.
Create an Atmosphere account on Bluesky to get started!
)}
);
};
const LinkAtmosphereContent = (props: {
pageView?: boolean;
redirectRoute?: string;
open?: boolean;
}) => {
let [loading, setLoading] = useState(false);
return (