feat: Keep only "Manage subscription" button in account subscription prefs (#711)
* feat: Add DASHBOARD_URL to .env.sample
This commit is contained in:
@@ -8,6 +8,7 @@ RAILS_SERVE_STATIC_FILES=true
|
|||||||
SECRET_KEY_BASE=test
|
SECRET_KEY_BASE=test
|
||||||
APP_HOST=http://localhost:3001
|
APP_HOST=http://localhost:3001
|
||||||
PURCHASE_URL=https://standardnotes.com/purchase
|
PURCHASE_URL=https://standardnotes.com/purchase
|
||||||
|
DASHBOARD_URL=http://standardnotes.com/dashboard
|
||||||
|
|
||||||
SF_DEFAULT_SERVER=http://localhost:3000
|
SF_DEFAULT_SERVER=http://localhost:3000
|
||||||
|
|
||||||
|
|||||||
@@ -42,23 +42,6 @@ const StatusText = observer(({ subscriptionState }: Props) => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
const PrimaryButton = observer(({ subscriptionState }: Props) => {
|
|
||||||
const { userSubscription } = subscriptionState;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Button
|
|
||||||
className="min-w-20 mt-3"
|
|
||||||
type="primary"
|
|
||||||
label={
|
|
||||||
userSubscription!.cancelled
|
|
||||||
? 'Renew subscription'
|
|
||||||
: 'Cancel subscription'
|
|
||||||
}
|
|
||||||
onClick={() => null}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
export const SubscriptionInformation = observer(
|
export const SubscriptionInformation = observer(
|
||||||
({ subscriptionState, application }: Props) => {
|
({ subscriptionState, application }: Props) => {
|
||||||
const openSubscriptionDashboard = async () => {
|
const openSubscriptionDashboard = async () => {
|
||||||
@@ -74,27 +57,12 @@ export const SubscriptionInformation = observer(
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<StatusText subscriptionState={subscriptionState} />
|
<StatusText subscriptionState={subscriptionState} />
|
||||||
<div className="flex flex-wrap">
|
<Button
|
||||||
<Button
|
className="min-w-20 mt-3 mr-3"
|
||||||
className="min-w-20 mt-3 mr-3"
|
type="normal"
|
||||||
type="normal"
|
label="Manage subscription"
|
||||||
label="Manage subscription"
|
onClick={openSubscriptionDashboard}
|
||||||
onClick={openSubscriptionDashboard}
|
/>
|
||||||
/>
|
|
||||||
<Button
|
|
||||||
className="min-w-20 mt-3 mr-3"
|
|
||||||
type="normal"
|
|
||||||
label="Refresh"
|
|
||||||
onClick={() => null}
|
|
||||||
/>
|
|
||||||
<Button
|
|
||||||
className="min-w-20 mt-3 mr-3"
|
|
||||||
type="normal"
|
|
||||||
label="Change plan"
|
|
||||||
onClick={() => null}
|
|
||||||
/>
|
|
||||||
<PrimaryButton subscriptionState={subscriptionState} />
|
|
||||||
</div>
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user