fix(subscription): return to chat from paywall
This commit is contained in:
@@ -16,12 +16,16 @@ import styles from "./subscription-back-link.module.css";
|
||||
|
||||
export interface SubscriptionBackLinkProps {
|
||||
className?: string;
|
||||
href?: string;
|
||||
}
|
||||
|
||||
export function SubscriptionBackLink({ className }: SubscriptionBackLinkProps) {
|
||||
export function SubscriptionBackLink({
|
||||
className,
|
||||
href = ROUTES.sidebar,
|
||||
}: SubscriptionBackLinkProps) {
|
||||
return (
|
||||
<Link
|
||||
href={ROUTES.sidebar}
|
||||
href={href}
|
||||
aria-label="Back"
|
||||
className={[styles.backLink, className].filter(Boolean).join(" ")}
|
||||
>
|
||||
|
||||
@@ -156,6 +156,7 @@ export function SubscriptionScreen({
|
||||
payment.isPollingOrder;
|
||||
const canActivate =
|
||||
selectedPlan !== null && payment.agreed && !isPaymentBusy;
|
||||
const backHref = returnTo === "chat" ? ROUTES.chat : ROUTES.sidebar;
|
||||
|
||||
const finishPaymentSuccessClose = () => {
|
||||
setShowPaymentSuccessDialog(false);
|
||||
@@ -215,7 +216,7 @@ export function SubscriptionScreen({
|
||||
<MobileShell>
|
||||
<div className={styles.shell}>
|
||||
<header className={styles.header}>
|
||||
<SubscriptionBackLink className={styles.backSlot} />
|
||||
<SubscriptionBackLink className={styles.backSlot} href={backHref} />
|
||||
</header>
|
||||
|
||||
<div className={styles.offerStack}>
|
||||
|
||||
Reference in New Issue
Block a user