-
Notifications
You must be signed in to change notification settings - Fork 109
feat(pcos): guide info #19814
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
feat(pcos): guide info #19814
Conversation
return ( | ||
<> | ||
<h2>{t('dashboardTitle')}</h2> | ||
<div className="flex justify-between w-full items-center"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this piece of code could be refactored? Because I've seen it several times on the PR. Whatever you think is best!
onGuideClick(guide); | ||
} | ||
const { url } = guide; | ||
if (url && /^(http|https):\/\//i.test(url)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it could be extracted in a regex with some tests
<CommandEmpty>{t('guidesNoResults')}</CommandEmpty> | ||
<CommandGroup data-testid="guide-header" heading={t('guidesTitle')}> | ||
{guides | ||
?.sort((a, b) => a.title.localeCompare(b.title)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it could be extracted in a function outside JSX
ad9aa60
to
6e24209
Compare
Signed-off-by: Lionel Bueno <lionel.bueno.ext@ovhcloud.com>
6e24209
to
9bcc50e
Compare
Description
Ticket Reference: #...
Additional Information