Skip to content
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

add side for one bus shortCircuit result #2282

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

souissimai
Copy link
Contributor

No description provided.

Signed-off-by: maissa SOUISSI <maissa.souissi@rte-france.com>
: side === BranchSide.TWO
? intl.formatMessage({ id: 'Side2' })
: undefined;
};
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this function can be outside the component:
function convertSide(side?: string) {
switch (side) {
case BranchSide.ONE:
return'Side1';
case BranchSide.TWO:
return 'Side2'
default:
return undefined;
}
}; or as const const sideMap = {
[BranchSide.ONE]: 'Side1',
[BranchSide.TWO]:'Side2',
}; andthen
side: intl.formatMessage({ id: convertSide(side) })

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No need to duplicate it I noticed that it's used by LF and SA also I just imported it

Signed-off-by: maissa SOUISSI <maissa.souissi@rte-france.com>
Copy link

sonarcloud bot commented Oct 3, 2024

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