Skip to content

refactor: migrate TenantOverview to ts #519

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 24, 2023
Merged

Conversation

krosy1337
Copy link
Contributor

No description provided.

@krosy1337 krosy1337 marked this pull request as ready for review August 23, 2023 11:03
withLeftTrim
hasClipboardButton={tenant}
hasClipboardButton={!!tenant}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need !!? Doesn't Boolean(tenant) suit here?

@@ -2,7 +2,7 @@ import type {TTenant} from '../../../types/api/tenant';
import {isNumeric} from '../../../utils/utils';

const getControlPlaneValue = (tenant: TTenant) => {
const parts = tenant.Name.split('/');
const parts = tenant.Name ? tenant.Name.split('/') : [];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can be simplified

    const parts = tenant.Name?.split('/');
    const defaultValue = parts?.length ? parts[parts.length - 1] : '—';

@krosy1337 krosy1337 force-pushed the refactor-tenant-overview branch from 9610270 to b5f2937 Compare August 24, 2023 15:36
@krosy1337 krosy1337 merged commit 75cd907 into main Aug 24, 2023
@krosy1337 krosy1337 deleted the refactor-tenant-overview branch August 24, 2023 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants