Skip to content

Conversation

lionel95200x
Copy link
Contributor

Description

Ticket Reference: #...

Additional Information

return (
<>
<h2>{t('dashboardTitle')}</h2>
<div className="flex justify-between w-full items-center">
Copy link
Contributor

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)) {
Copy link
Contributor

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))
Copy link
Contributor

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

Signed-off-by: Lionel Bueno <lionel.bueno.ext@ovhcloud.com>
@lionel95200x lionel95200x merged commit 2b12a07 into feat/rework-pcos Oct 20, 2025
12 of 15 checks passed
@lionel95200x lionel95200x deleted the feat/pcos-guides branch October 20, 2025 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants