+
setValue(e.target.value)}
+ value={props.value}
+ onChange={(e) => props.onChange(e.target.value)}
/>
-
- {props.action === "login" ? (
-
- ) : (
-
- {props.action === "link" ? "Link" : "Subscribe"}
-
- )}
-
- }
- >
- {state === "success" ? (
-
- ) : (
-
{
- props.action === "subscribe"
- ? setState("success")
- : props.action === "link"
- ? toaster({
- content: (
- Linked your email!
- ),
- type: "success",
- })
- : toaster({
- content: Welcome back!
,
- type: "success",
- });
- }}
- />
- )}
-
+
+ {props.action}
+
);
};
diff --git a/components/Subscribe/HandleSubscribe.tsx b/components/Subscribe/HandleSubscribe.tsx
index ea49bdee..67448b46 100644
--- a/components/Subscribe/HandleSubscribe.tsx
+++ b/components/Subscribe/HandleSubscribe.tsx
@@ -14,7 +14,6 @@ import {
} from "./Logos";
import { Separator } from "components/Layout";
-import { GoToArrow } from "components/Icons/GoToArrow";
export const SubscribeWithHandle = (props: {
autoFocus?: boolean;
@@ -71,42 +70,28 @@ export const LinkHandle = (props: { compact?: boolean }) => {
export const HandleInput = (props: {
autoFocus?: boolean;
- action?: "subscribe" | "link" | "login";
+ action?: React.ReactNode;
className?: string;
+ large?: boolean;
}) => {
let [handleValue, setHandleValue] = useState("");
return (
-
+
@
setHandleValue(e.target.value)}
/>
-
- {props.action === "login" ? (
-
- ) : (
-
- {props.action === "link"
- ? "Link"
- : props.action === "subscribe"
- ? "Subscribe"
- : null}
-
- )}
-
+ {props.action}
);
};
@@ -167,31 +152,27 @@ export const AtmosphericHandleInfo = (props: { trigger?: React.ReactNode }) => {
props.trigger
) : (
- What's a universal handle?
+ What's the Atmosphere
)
}
>
- Your universal handle is the username you use to sign into enabled apps
- like...{" "}
+ The Atmosphere is a family of apps that you can access with a single
+ account
-
+
+
Apps like...
+
} name="Leaflet" />
} name="Bluesky" />
} name="Blacksky" />
} name="Eurosky" />
} name="Tangled" />
-
-
A handle can log into ANY enabled app.
-
- ie, you can log into Leaflet with the handle you made
- for Bluesky !
-
-
+
- Create a handle on Bluesky!
+ Sign up through Bluesky!
);
diff --git a/components/Subscribe/ManageSubscribe.tsx b/components/Subscribe/ManageSubscribe.tsx
index 3c038bc9..7133e6c4 100644
--- a/components/Subscribe/ManageSubscribe.tsx
+++ b/components/Subscribe/ManageSubscribe.tsx
@@ -1,9 +1,12 @@
-import { ButtonSecondary } from "components/Buttons";
+"use client";
+import { useState } from "react";
+import { ButtonPrimary, ButtonSecondary } from "components/Buttons";
import { CheckTiny } from "components/Icons/CheckTiny";
import { GoToArrow } from "components/Icons/GoToArrow";
import { Modal } from "components/Modal";
+import { useToaster } from "components/Toast";
import { LinkHandle } from "./HandleSubscribe";
-import { EmailInput } from "./EmailSubscribe";
+import { EmailInput, EmailConfirm } from "./EmailSubscribe";
export const ManageSubscription = (props: {
newsletterMode: boolean;
@@ -14,6 +17,8 @@ export const ManageSubscription = (props: {
subscribed: boolean;
};
}) => {
+ let [email, setEmail] = useState(props.user?.email ?? "");
+ let toaster = useToaster();
let prefClassName =
"flex gap-2 justify-between font-bold text-secondary items-center";
return (
@@ -68,7 +73,33 @@ export const ManageSubscription = (props: {
to get updates right to your inbox!
-