): PaymentPlan {
@@ -74,10 +73,4 @@ describe("tip screen helpers", () => {
expect(formatTipPrice(null, "medium")).toBe("US$ 9.99");
expect(formatTipPrice(null, "large")).toBe("US$ 19.99");
});
-
- it("treats guest and notLoggedIn as non-real login states", () => {
- expect(isRealLoginStatus("guest")).toBe(false);
- expect(isRealLoginStatus("notLoggedIn")).toBe(false);
- expect(isRealLoginStatus("facebook")).toBe(true);
- });
});
diff --git a/src/app/tip/tip-checkout-button.tsx b/src/app/tip/tip-checkout-button.tsx
index f09cffbc..0bd50538 100644
--- a/src/app/tip/tip-checkout-button.tsx
+++ b/src/app/tip/tip-checkout-button.tsx
@@ -17,7 +17,6 @@ const log = new Logger("TipCheckoutButton");
export interface TipCheckoutButtonProps {
coffeeType: TipCoffeeType;
disabled?: boolean;
- isAuthLoading?: boolean;
onOrder: () => void;
returnPath: string;
}
@@ -25,7 +24,6 @@ export interface TipCheckoutButtonProps {
export function TipCheckoutButton({
coffeeType,
disabled = false,
- isAuthLoading = false,
onOrder,
returnPath,
}: TipCheckoutButtonProps) {
@@ -42,8 +40,7 @@ export function TipCheckoutButton({
characterSlug: character.slug,
});
- const isLoading =
- isAuthLoading || payment.isCreatingOrder || payment.isPollingOrder;
+ const isLoading = payment.isCreatingOrder || payment.isPollingOrder;
const label = payment.isPollingOrder
? "Processing payment..."
: payment.isCreatingOrder
diff --git a/src/app/tip/tip-screen.helpers.ts b/src/app/tip/tip-screen.helpers.ts
index b816b218..abb79f71 100644
--- a/src/app/tip/tip-screen.helpers.ts
+++ b/src/app/tip/tip-screen.helpers.ts
@@ -1,4 +1,3 @@
-import type { LoginStatus } from "@/data/schemas/auth";
import type { PaymentPlan } from "@/data/schemas/payment";
import {
getTipCoffeeOption,
@@ -30,7 +29,3 @@ export function formatTipPrice(
if (currency.length > 0) return `${currency} ${formattedAmount}`;
return formattedAmount;
}
-
-export function isRealLoginStatus(loginStatus: LoginStatus): boolean {
- return loginStatus !== "notLoggedIn" && loginStatus !== "guest";
-}
diff --git a/src/app/tip/tip-screen.tsx b/src/app/tip/tip-screen.tsx
index 8c56136c..8b31470d 100644
--- a/src/app/tip/tip-screen.tsx
+++ b/src/app/tip/tip-screen.tsx
@@ -23,12 +23,10 @@ import {
TIP_COFFEE_OPTIONS,
type TipCoffeeType,
} from "@/lib/tip/tip_coffee";
-import { useAppNavigator } from "@/router/use-app-navigator";
import {
useActiveCharacter,
useActiveCharacterRoutes,
} from "@/providers/character-provider";
-import { useAuthState } from "@/stores/auth/auth-context";
import { useUserState } from "@/stores/user/user-context";
import { TipCheckoutButton } from "./tip-checkout-button";
@@ -39,7 +37,6 @@ import {
import {
findTipCoffeePlan,
formatTipPrice,
- isRealLoginStatus,
} from "./tip-screen.helpers";
import styles from "./tip-screen.module.css";
@@ -59,10 +56,8 @@ export function TipScreen({
shouldResumePendingOrder = false,
initialPayChannel = null,
}: TipScreenProps) {
- const navigator = useAppNavigator();
const character = useActiveCharacter();
const characterRoutes = useActiveCharacterRoutes();
- const authState = useAuthState();
const userState = useUserState();
const paymentMethodConfig = getPaymentMethodConfig({
countryCode: userState.currentUser?.countryCode,
@@ -125,7 +120,6 @@ export function TipScreen({
payment.status === "ready" && !payment.isLoadingPlans && coffeePlan === null;
const isTierSelectionDisabled =
payment.status !== "ready" || payment.isLoadingPlans || isPaymentBusy;
- const isAuthLoading = !authState.hasInitialized || authState.isLoading;
const handlePaymentMethodChange = (payChannel: PayChannel) => {
paymentDispatch({
@@ -176,16 +170,9 @@ export function TipScreen({
]);
const handleOrder = () => {
- if (isAuthLoading) return;
- if (coffeePlan) {
- behaviorAnalytics.planClick(coffeePlan, TIP_ANALYTICS_CONTEXT);
- }
- if (!isRealLoginStatus(authState.loginStatus)) {
- navigator.openAuth(returnPath);
- return;
- }
if (!canCreateOrder) return;
+ behaviorAnalytics.planClick(coffeePlan, TIP_ANALYTICS_CONTEXT);
paymentDispatch({
type: "PaymentCreateOrderSubmitted",
recipientCharacterId: character.id,
@@ -249,7 +236,8 @@ export function TipScreen({
{character.copy.tipTitle}
- Send a warm coffee tip and keep the private moments glowing.
+ ❤️ Thank you for being here. If you'd ever like to treat me to a
+ little coffee, I'd really appreciate it. ☕
@@ -322,11 +310,7 @@ export function TipScreen({