Skip to content

Commit

Permalink
fix: hide association & RNE for bots
Browse files Browse the repository at this point in the history
fix #1056
  • Loading branch information
johangirod committed May 15, 2024
1 parent 39e009e commit b74e19d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
11 changes: 8 additions & 3 deletions app/(header-default)/dirigeants/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,14 @@ const DirigeantsPage = async (props: AppRouterProps) => {
{servicePublic ? (
<ResponsableSection servicePublic={servicePublic} />
) : (
<Suspense fallback={<PageLoader />}>
<DirigeantInformation uniteLegale={uniteLegale} session={session} />
</Suspense>
!isBot && (
<Suspense fallback={<PageLoader />}>
<DirigeantInformation
uniteLegale={uniteLegale}
session={session}
/>
</Suspense>
)
)}
</div>
</>
Expand Down
2 changes: 1 addition & 1 deletion app/(header-default)/entreprise/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export default async function UniteLegalePage(props: AppRouterProps) {
<BreakPageForPrint />
</>
)}
{isAssociation(uniteLegale) && (
{!isBot && isAssociation(uniteLegale) && (
<AssociationSection uniteLegale={uniteLegale} session={session} />
)}
<UsefulShortcuts uniteLegale={uniteLegale} />
Expand Down
16 changes: 9 additions & 7 deletions app/(header-default)/justificatif/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,15 @@ const JustificatifPage = async (props: AppRouterProps) => {
ficheType={FICHE.JUSTIFICATIFS}
session={session}
/>
<Suspense fallback={<PageLoader />}>
<Immatriculations
uniteLegale={uniteLegale}
immatriculationJOAFE={immatriculationJOAFE}
session={session}
/>
</Suspense>
{!isBot && (
<Suspense fallback={<PageLoader />}>
<Immatriculations
uniteLegale={uniteLegale}
immatriculationJOAFE={immatriculationJOAFE}
session={session}
/>
</Suspense>
)}
</div>
</>
);
Expand Down

0 comments on commit b74e19d

Please sign in to comment.