Skip to content

Commit

Permalink
feat: Fiche établissement et entreprise : ajouter le menu latéral
Browse files Browse the repository at this point in the history
  • Loading branch information
ImenOuidou committed Sep 12, 2023
1 parent 56a50b7 commit a105154
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 37 deletions.
1 change: 1 addition & 0 deletions src/client/src/components/App/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ a {
.sourceApi {
display: flex;
align-items: flex-end !important;
justify-content: center;
color: black;
span {
font-size: 0.5rem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const Finances = ({ siret, siren }) => {
datesApi = donneesEcofiApi?.map((donneeEcofi) => {
return (
<th
className="has-text-right"
className="th table-cell--center-cell"
key={getKey("data.date_fin_exercice", donneeEcofi?.data)}
>
<Value value={getDateDeclaration(donneeEcofi?.data)} empty="-" />
Expand All @@ -126,7 +126,7 @@ const Finances = ({ siret, siren }) => {
caListApi = donneesEcofiApi?.map((donneeEcofi) => {
return (
<td
className="has-text-right"
className="th table-cell--center-cell"
key={getKey("data.ca", donneeEcofi.data)}
>
<Value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
line-height: 2.25rem;
}
.etbList {
height: 300px;
max-height: 380px;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import PropTypes from "prop-types";
import React, { createContext, useContext } from "react";

import LoadableContent from "../../../shared/LoadableContent/LoadableContent";
import { useSidebarData } from "../../Sidebar/Sidebar.gql";

const EstablishmentContext = createContext();
Expand All @@ -13,13 +14,18 @@ export const EstablishmentProvider = ({ siren, children }) => {
} = useSidebarData(siren, {
limit: undefined,
});
if (loading || error) {
return null;
}

const sharedData = { data: entreprise, error, loading };
const sharedData = { data: entreprise, error, isLoading: loading };

return (
<EstablishmentContext.Provider value={sharedData}>
{children}
</EstablishmentContext.Provider>
<LoadableContent loading={loading} error={error}>
<EstablishmentContext.Provider value={sharedData}>
{children}
</EstablishmentContext.Provider>
</LoadableContent>
);
};

Expand Down
30 changes: 0 additions & 30 deletions src/client/src/components/shared/Icons/BuildingIcon copy.jsx

This file was deleted.

0 comments on commit a105154

Please sign in to comment.