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

fix: fil arianne #382

Merged
merged 3 commits into from
Jun 21, 2024
Merged

fix: fil arianne #382

merged 3 commits into from
Jun 21, 2024

Conversation

lheneman-pass
Copy link
Collaborator

Description

Cette pull request permet d'afficher le fil d'arianne sur toutes les pages.
Celui n'était présent que sur certaine page.

Changements

Les fichiers concernés par les changements :
modified: public_website/src/pages/[...slug].tsx : ajout d'une condition au niveau du render pour afficher Breadcrumb après le header de la page
modified: public_website/src/ui/components/breadcrumb/Breadcrumb.tsx : prise en compte de la deuxième partie de la navigation (aboutItems) et utilisation de isStringAreEquals.

Notion

Plusieurs tickets y font référence.
Exemple : ici

public_website/src/pages/[...slug].tsx Outdated Show resolved Hide resolved
return index === 1 ? (
<React.Fragment key={`${block.__component}_${block.id}`}>
<Breadcrumb isUnderHeader />
<BlockRenderer
Copy link
Contributor

Choose a reason for hiding this comment

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

Est-ce qu'on peut éviter de répéter l'écriture de ce composant ?

Copy link
Collaborator Author

@lheneman-pass lheneman-pass Jun 21, 2024

Choose a reason for hiding this comment

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

Tu parles de BlockRenderer ? Si oui, si on ne l'affiche pas en index 1, il va nous manquer un bloc ou alors j'ai pas bien compris ta demande.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oui, je voyais la factorisation de

const BlockRendererEx = (block)=>(<BlockRenderer
            key={`${block.__component}_${block.id}`}
            block={block}
/>)

et

index === 1 ? (...<BlockRenderEx block={block} />...) : <BlockRenderEx block={block} />

Copy link

sonarcloud bot commented Jun 21, 2024

@pierrecanthelou pierrecanthelou merged commit 208e427 into main Jun 21, 2024
8 checks passed
@pierrecanthelou pierrecanthelou deleted the fix-breadcrumb-page branch June 21, 2024 12:04
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.

None yet

2 participants