Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion site/src/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,8 @@ type Claims = {
account_id?: string;
trial: boolean;
all_features: boolean;
feature_set: string;
// feature_set is omitted on legacy licenses
feature_set?: string;
version: number;
features: Record<string, number>;
require_telemetry?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const LicenseCard: FC<LicenseCardProps> = ({

const licenseType = license.claims.trial
? "Trial"
: license.claims.feature_set.toLowerCase() === "premium"
: license.claims.feature_set?.toLowerCase() === "premium"
? "Premium"
: "Enterprise";

Expand Down
3 changes: 0 additions & 3 deletions site/src/testHelpers/entities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2647,7 +2647,6 @@ export const MockLicenseResponse: GetLicensesResponse[] = [
claims: {
trial: false,
all_features: true,
feature_set: "", // Legacy is empty
version: 1,
features: {},
license_expires: 3420244800,
Expand All @@ -2661,7 +2660,6 @@ export const MockLicenseResponse: GetLicensesResponse[] = [
claims: {
trial: false,
all_features: true,
feature_set: "", // Legacy is empty
version: 1,
features: {},
license_expires: 1660104000,
Expand All @@ -2675,7 +2673,6 @@ export const MockLicenseResponse: GetLicensesResponse[] = [
claims: {
trial: false,
all_features: true,
feature_set: "", // Legacy is empty
version: 1,
features: {},
license_expires: 1682346425,
Expand Down
Loading