Skip to content

Commit

Permalink
Merge pull request #1372 from betagouv/preparation-message-api-sur-da…
Browse files Browse the repository at this point in the history
…tagouv

API-3275 Panneau pour indiquer que l'API est migrée sur data.gouv.fr
  • Loading branch information
JeSuisUnCaillou authored Nov 21, 2024
2 parents 1b881ff + 731121e commit 098c577
Show file tree
Hide file tree
Showing 6 changed files with 8,292 additions and 3 deletions.
10 changes: 9 additions & 1 deletion components/api/apiDescription.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,22 @@ import RichReactMarkdown from '../../components/richReactMarkdown';
import Section from '../../components/api/section';
import { IGuideElementShort } from '../../model';
import { H3WithAnchor } from '../../uiComponents/titleWithAnchor';
import slugify from 'slugify';

const ApiDescription: React.FC<{
content_intro?: string;
body: string;
guides: IGuideElementShort[];
}> = ({ content_intro, guides, body }) => (
title: string;
}> = ({ content_intro, guides, body, title }) => (
<Section id="api-description" title="Description">
<>
<div style={{backgroundColor: "#FFE9E6", color: "#B34000", padding: "1rem"}}>
<strong>⚠️ Ces informations ne sont plus mises à jour depuis le 06/09/2024.</strong><br />
Le site API.gouv.fr va progressivement être fusionné dans le catalogue unique data.gouv.fr. <br /><br />
Retrouvez la fiche d'information à jour de cette API sur la nouvelle page API de Data.gouv.fr <a href={`https://data.gouv.fr/fr/dataservices/${slugify(title)}`} target="_blank" rel="noopener noreferrer">⇢ Consulter la fiche à jour</a>
</div>

{content_intro && <RichReactMarkdown source={content_intro} />}
{guides.length > 0 && (
<>
Expand Down
2 changes: 2 additions & 0 deletions layouts/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { PropsWithChildren } from 'react';

import { Footer, PreFooter, Header, Meta, DocHeader } from '../components';
import { Question } from '../uiComponents/question';
import { AlertFusion } from '../uiComponents/alertFusion';

interface IProps {
title: string;
Expand Down Expand Up @@ -35,6 +36,7 @@ const Page: React.FC<PropsWithChildren<IProps>> = ({
canonical={canonical}
/>
{useDocHeader ? <DocHeader /> : <Header headerKey={headerKey || 'home'} />}
<AlertFusion/>
<main>{children}</main>
<Question />
{usePreFooter && <PreFooter background={preFooterBackground} />}
Expand Down
Loading

0 comments on commit 098c577

Please sign in to comment.