Skip to content

Commit

Permalink
feat: add call for idead component
Browse files Browse the repository at this point in the history
  • Loading branch information
gary-van-woerkens committed Aug 25, 2023
1 parent d72504f commit ec4ad3a
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 7 deletions.
4 changes: 3 additions & 1 deletion src/app/startups/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import getStartups from "../get-startups"
import RemoteContent from "./remote-content"
import LocalContent from "./local-content"
import RandomStartups from "@/components/random-startups"
import CallForIdeas from "@/components/call-for-ideas"

export async function generateStaticParams() {
const startups = getStartups()
Expand Down Expand Up @@ -40,7 +41,7 @@ export default async function StartupPage({
} = startup

return (
<div className="startups-details">
<div className="startup-page">
<div className="fr-py-6w">
<div className="fr-container flex">
<div className="flex-1">
Expand Down Expand Up @@ -95,6 +96,7 @@ export default async function StartupPage({
/>
<LocalContent id={id} />
<RandomStartups />
<CallForIdeas />
</div>
)
}
23 changes: 23 additions & 0 deletions src/components/call-for-ideas.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { CallOut } from "@codegouvfr/react-dsfr/CallOut"

export default function CallForIdeas() {
return (
<div className="call-for-ideas fr-pb-6w">
<div className="fr-container">
<CallOut
buttonProps={{
children: "Je soumets mon idée !",
// onClick: function noRefCheck() {},
}}
iconId="ri-information-line"
title="VOUS AVEZ UNE IDÉE ?"
>
Vous êtes témoin d&apos;un problème récurrent que rencontrent les
citoyens ou les agents publics ? Participez à l&apos;amélioration du
service public des minitères sociaux en proposant vos de startups
d&apos;État.
</CallOut>
</div>
</div>
)
}
16 changes: 10 additions & 6 deletions src/components/random-startups.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@ export default function RandomStartups() {
const randomStartups = getRandomEntries(startups, 4)

return (
<div className="random-startups fr-container">
<h2 className="fr-h2">Découvrez d&apos;autres startups de la Fabrique</h2>
<div className="grid grid-cols-4 gap-6 fr-mt-6w">
{randomStartups.map((startup) => (
<Item key={startup.id} startup={startup} />
))}
<div className="random-startups fr-pb-6w">
<div className="fr-container">
<h2 className="fr-h2">
Découvrez d&apos;autres startups de la Fabrique
</h2>
<div className="grid grid-cols-4 gap-6 fr-mt-6w">
{randomStartups.map((startup) => (
<Item key={startup.id} startup={startup} />
))}
</div>
</div>
</div>
)
Expand Down

0 comments on commit ec4ad3a

Please sign in to comment.