11import { Button , Paper , Stack , Typography } from "@mui/material" ;
2- import { useState } from "react" ;
32import { useRecoilValue } from "recoil" ;
43import {
54 organizationState ,
65 profileSelector ,
76 profileFlagsSelector ,
87} from "../data/atoms" ;
9- import SubscriptionUpdateModal from "./SubscriptionUpdateModal" ;
108import { formatStorage } from "../data/utils" ;
119
1210function Subscription ( props ) {
13- const [ subscriptionUpdateModalOpen , setSubscriptionUpdateModalOpen ] =
14- useState ( false ) ;
1511 const profileFlags = useRecoilValue ( profileFlagsSelector ) ;
1612 const profile = useRecoilValue ( profileSelector ) ;
1713 const organization = useRecoilValue ( organizationState ) ;
@@ -90,14 +86,6 @@ function Subscription(props) {
9086 </ Stack >
9187 </ Paper >
9288 </ Stack >
93- { subscriptionUpdateModalOpen && (
94- < SubscriptionUpdateModal
95- open = { subscriptionUpdateModalOpen }
96- handleCloseCb = { ( ) => {
97- setSubscriptionUpdateModalOpen ( false ) ;
98- } }
99- />
100- ) }
10189 </ Stack >
10290 { ! profileFlags . IS_ORGANIZATION_MEMBER && (
10391 < Button
@@ -107,10 +95,12 @@ function Subscription(props) {
10795 display : profileFlags . IS_ORGANIZATION_MEMBER ? "none" : "inherit" ,
10896 alignSelf : "end" ,
10997 } }
110- onClick = { ( ) => {
111- setSubscriptionUpdateModalOpen ( true ) ;
112- } }
113- disabled = { profileFlags . IS_PRO_SUBSCRIBER }
98+ component = "a"
99+ href = { `${
100+ process . env . REACT_APP_SUBSCRIPTION_MANAGEMENT_URL
101+ } ?prefilled_email=${ encodeURIComponent ( props . user_email ) } `}
102+ target = "_blank"
103+ rel = "noreferrer"
114104 >
115105 Manage Subscription
116106 </ Button >
0 commit comments