Add account selection functionality to mobile navigation
Added a new type, 'Accounts', and used it to enable account selection from the mobile navigation menu. The 'Accounts' type incorporates the label, value, and image of a given account. This change will improve the app's usability, making it easier for users to navigate different accounts directly from their mobile devices. For custom plans, a null check has been implemented to avoid rendering null values.
This commit is contained in:
@@ -213,7 +213,7 @@ export function PlanPicker(
|
||||
return item.interval === selectedInterval;
|
||||
});
|
||||
|
||||
if (!plan) {
|
||||
if (!plan || plan.custom) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ interface AccountSelectorProps {
|
||||
|
||||
selectedAccount?: string;
|
||||
collapsed?: boolean;
|
||||
className?: string;
|
||||
|
||||
onAccountChange: (value: string | undefined) => void;
|
||||
}
|
||||
@@ -48,6 +49,7 @@ export function AccountSelector({
|
||||
accounts,
|
||||
selectedAccount,
|
||||
onAccountChange,
|
||||
className,
|
||||
features = {
|
||||
enableTeamCreation: true,
|
||||
},
|
||||
@@ -104,6 +106,7 @@ export function AccountSelector({
|
||||
'justify-start': !collapsed,
|
||||
'justify-center': collapsed,
|
||||
},
|
||||
className,
|
||||
)}
|
||||
>
|
||||
<If
|
||||
|
||||
Reference in New Issue
Block a user