Skip to content

Commit

Permalink
create dashboard component
Browse files Browse the repository at this point in the history
  • Loading branch information
rebeccadumazert committed Jan 8, 2024
1 parent e079018 commit 3829dd0
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 5 deletions.
62 changes: 62 additions & 0 deletions front/src/providers/connectedSpaces/Dashboard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import { Badge } from '@codegouvfr/react-dsfr/Badge';
import Title1 from '../../titles/Title1';
import { Card } from '@codegouvfr/react-dsfr/Card';

export const Dashboard = () => {
return (
<div className="fr-container fr-mb-10v">
<Title1>Tableau de bord</Title1>
<div className="fr-grid-row fr-grid-row--gutters">
<div className="container fr-col-6">
<Card
background
border
desc="Description text MD"
horizontal
enlargeLink
linkProps={{
to: '#',
}}
size="small"
start={
<ul className="fr-badges-group">
<li>
<Badge>Clés de test</Badge>
<Badge severity="info">DINUM</Badge>
</li>
</ul>
}
title="Test"
titleAs="h2"
/>
</div>

{/* CARTE 2 !! */}

<div className="container fr-col-6">
<Card
background
border
desc="Description text MD"
horizontal
enlargeLink
linkProps={{
to: '#',
}}
size="small"
start={
<ul className="fr-badges-group">
<li>
<Badge>Clés de test</Badge>
<Badge severity="info">ANCT</Badge>
</li>
</ul>
}
title="Test"
titleAs="h2"
/>
</div>
</div>
</div>
);
};
7 changes: 2 additions & 5 deletions front/src/routes/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { EspaceConnected } from '../providers/connectedSpaces/EspaceConnected';
import { ProviderDetails } from '../providers/details/ProviderDetails';
import { OidcClientFormProvider } from '../providers/details/oidc-client-form.context';
import { EspaceDocumentation } from '../providers/documentation/EspaceDocumentation';
import { Dashboard } from '../providers/connectedSpaces/Dashboard';

const router = createBrowserRouter([
{
Expand Down Expand Up @@ -43,11 +44,7 @@ const router = createBrowserRouter([
},
element: (
<PageLayout>
<>
<a href="/dashboard/new">NEW</a>
<br />
<a href="/dashboard/123">Rebecca Project 123</a>
</>
<Dashboard></Dashboard>
</PageLayout>
),
},
Expand Down

0 comments on commit 3829dd0

Please sign in to comment.