Skip to content

Commit 5f2fdfd

Browse files
committed
Upgrade to the new accounts module to prepare for upcoming changes
1 parent 844b267 commit 5f2fdfd

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"@fortawesome/free-regular-svg-icons": "^5.12.1",
4343
"@fortawesome/free-solid-svg-icons": "^5.12.1",
4444
"@fortawesome/react-fontawesome": "^0.1.8",
45-
"@httptoolkit/accounts": "^2.1.1",
45+
"@httptoolkit/accounts": "^2.2.0",
4646
"@httptoolkit/httpsnippet": "^2.1.7",
4747
"@open-rpc/meta-schema": "^1.14.2",
4848
"@phosphor-icons/react": "^2.1.5",

src/components/settings/settings-page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,10 @@ class SettingsPage extends React.Component<SettingsPageProps> {
193193
<ContentValue>
194194
{
195195
subscriptionPlans.state === 'fulfilled'
196-
? (subscriptionPlans.value as SubscriptionPlans)[sub.plan]?.name
196+
? (subscriptionPlans.value as SubscriptionPlans)[sub.sku]?.name
197197
// If the accounts API is unavailable for plan metadata for some reason, we can just
198198
// format the raw SKU to get something workable, no worries:
199-
: _.startCase(sub.plan)
199+
: _.startCase(sub.sku)
200200
}
201201
</ContentValue>
202202

@@ -357,7 +357,7 @@ class SettingsPage extends React.Component<SettingsPageProps> {
357357
throw new Error("Can't cancel without a subscription");
358358
}
359359

360-
const planName = SubscriptionPlans[subscription.plan].name;
360+
const planName = SubscriptionPlans[subscription.sku].name;
361361

362362
let cancelEffect: string;
363363

0 commit comments

Comments
 (0)