Refactor admin account page and email resend logic
The changes include breaking out `is_personal_account` into its own constant for better readability in the Admin Account page. On the email resend logic, the code has been simplified, directly throwing an error when the response is not OK, thereby eliminating unnecessary conditional and assignment statements.
This commit is contained in:
@@ -34,7 +34,9 @@ type Membership = Db['accounts_memberships']['Row'];
|
||||
export function AdminAccountPage(props: {
|
||||
account: Account & { memberships: Membership[] };
|
||||
}) {
|
||||
if (props.account.is_personal_account) {
|
||||
const isPersonalAccount = props.account.is_personal_account;
|
||||
|
||||
if (isPersonalAccount) {
|
||||
return <PersonalAccountPage account={props.account} />;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user