Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const LicenseCard = () => {
const [toast, setToast] = useState('');
const [toastType, setToastType] = useState('success');

const { valid, expiration } = license;
const { valid, expiration, tier } = license;
const { whiteLabel, strings } = neveDash;
const { licenseCardHeading, licenseCardDescription } = strings;
const isValid = 'valid' === valid;
Expand Down Expand Up @@ -70,6 +70,17 @@ const LicenseCard = () => {
return statusLabelMap[status];
};

const getPlanLabel = () => {
const planLabel = {
1: __('Personal', 'neve'),
2: __('Business', 'neve'),
3: __('Agency', 'neve'),
};

return planLabel[tier] || null;
};
const planLabel = getPlanLabel();

return (
<Card title={licenseCardHeading}>
<div className="grid gap-4">
Expand Down Expand Up @@ -124,6 +135,11 @@ const LicenseCard = () => {
)}
{isOrWasValid && (
<div className="flex items-center gap-1">
{planLabel && (
<p className="px-1.5 py-0.5 rounded text-white bg-blue-600">
{planLabel}
</p>
)}
<Pill
type={isValid ? 'success' : 'warning'}
className="inline-flex items-center gap-1 px-2 py-1"
Expand Down
Loading