MCPcopy Create free account
hub / github.com/dailydotdev/apps / PlusInfo

Function PlusInfo

packages/webapp/pages/settings/subscription.tsx:59–128  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

57};
58
59const PlusInfo = (): ReactElement => {
60 const { isPlus, plusProvider, logSubscriptionEvent, plusHref } =
61 usePlusSubscription();
62
63 return (
64 <>
65 <div className="flex flex-col gap-1">
66 <Typography bold type={TypographyType.Body}>
67 You&apos;re already a Plus member!
68 </Typography>
69 <Typography
70 type={TypographyType.Callout}
71 color={TypographyColor.Tertiary}
72 >
73 {`Thank you for supporting daily.dev and unlocking the best experience
74 we offer. Manage your subscription to update your plan, payment
75 details, or preferences anytime.`}
76 </Typography>
77
78 {!isIOSNative() &&
79 plusProvider === SubscriptionProvider.AppleStoreKit && (
80 <Typography
81 type={TypographyType.Callout}
82 color={TypographyColor.Tertiary}
83 className="mt-2"
84 >
85 Your plus subscription is managed via App Store, to manage it
86 please visit the App Store
87 </Typography>
88 )}
89 </div>
90
91 <div className="flex gap-3">
92 <Button
93 tag="a"
94 size={ButtonSize.Small}
95 variant={ButtonVariant.Secondary}
96 href={plusHref}
97 target={
98 isPlus && plusProvider === SubscriptionProvider.Paddle
99 ? '_blank'
100 : undefined
101 }
102 disabled={
103 !isIOSNative() &&
104 plusProvider === SubscriptionProvider.AppleStoreKit
105 }
106 onClick={() => {
107 if (
108 isIOSNative() &&
109 plusProvider === SubscriptionProvider.AppleStoreKit
110 ) {
111 postWebKitMessage(
112 WebKitMessageHandlers.IAPSubscriptionManage,
113 null,
114 );
115 }
116

Callers

nothing calls this directly

Calls 3

usePlusSubscriptionFunction · 0.90
isIOSNativeFunction · 0.90
postWebKitMessageFunction · 0.90

Tested by

no test coverage detected