Skip to content

Commit

Permalink
fix TS error
Browse files Browse the repository at this point in the history
  • Loading branch information
rebeccadumazert committed Jan 10, 2024
1 parent b66b662 commit 27eb8c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions front/src/providers/connectedSpaces/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import { Badge } from '@codegouvfr/react-dsfr/Badge';
import Title1 from '../../titles/Title1';
import { Card } from '@codegouvfr/react-dsfr/Card';
import { useRouteLoaderData } from 'react-router-dom';
import { OidcClients } from '../../types';

export const Dashboard = () => {
const oidcClients = useRouteLoaderData('dashboard');
const oidcClients = useRouteLoaderData('dashboard') as OidcClients;
return (
<div className="fr-container fr-mb-10v">
<Title1>Tableau de bord</Title1>
<div className="fr-grid-row fr-grid-row--gutters">
{/* ERREUR DE TYPAGE A CORRIGER */}
{oidcClients.map((oidcClient) => (
<div className="container fr-col-6">
<Card
Expand Down
4 changes: 2 additions & 2 deletions front/src/routes/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ 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';
import { OidcClient } from '../types';
import { OidcClients } from '../types';

const router = createBrowserRouter([
{
Expand Down Expand Up @@ -41,7 +41,7 @@ const router = createBrowserRouter([
{
path: '/dashboard',
loader: async () => {
const datas: OidcClient = await backendClient.getDashboard();
const datas: OidcClients = await backendClient.getDashboard();
return datas;
},
id: 'dashboard',
Expand Down

0 comments on commit 27eb8c5

Please sign in to comment.