diff --git a/src/components/ContainerComponents/FluidChartContainer/FluidChartContainer.tsx b/src/components/ContainerComponents/FluidChartContainer/FluidChartContainer.tsx index 5837e30ee3193f234c59a47f9519943497e32b24..f29bf24da1ca4a3308d0addfc357eaee8598d056 100644 --- a/src/components/ContainerComponents/FluidChartContainer/FluidChartContainer.tsx +++ b/src/components/ContainerComponents/FluidChartContainer/FluidChartContainer.tsx @@ -52,6 +52,8 @@ const FluidChartContainer: React.FC<FluidChartContainerProps> = ({ FluidType.ELECTRICITY, TimeStep.HALF_AN_HOUR )) + console.log(activateHalfHourLoad) + const data = await consumptionDataManager.fetchLastDateData(fluidTypes) const dataWithAllFluids = await consumptionDataManager.fetchLastDateData( fluidTypes, @@ -112,23 +114,25 @@ const FluidChartContainer: React.FC<FluidChartContainerProps> = ({ return ( <> {isLoaded ? ( - <div className="fc-root"> - <div className="fc-content"> - {isMinuteBlocked && timeStep === 10 && <ActivateHalfHourLoad />} - <FluidChartContent - referenceDate={referenceDate} - lastDataDate={lastDataDate} - lastDateWithAllData={lastDateWithAllData} - fluidTypes={fluidTypes} - timeStep={timeStep} - multiFluid={multiFluid} - currentChallenge={challenge} - consumptionDataManager={consumptionDataManager} - isDataLoaded={isLoaded} - handleDetailedDate={handleDetailedDate} - ></FluidChartContent> + <> + {isMinuteBlocked && timeStep === 10 && <ActivateHalfHourLoad />} + <div className="fc-root"> + <div className="fc-content"> + <FluidChartContent + referenceDate={referenceDate} + lastDataDate={lastDataDate} + lastDateWithAllData={lastDateWithAllData} + fluidTypes={fluidTypes} + timeStep={timeStep} + multiFluid={multiFluid} + currentChallenge={challenge} + consumptionDataManager={consumptionDataManager} + isDataLoaded={isLoaded} + handleDetailedDate={handleDetailedDate} + ></FluidChartContent> + </div> </div> - </div> + </> ) : null} </> ) diff --git a/src/services/consumptionDataManagerService.ts b/src/services/consumptionDataManagerService.ts index ff2d6ec33e0e4b35a9c6df861ede69c0b3f33605..b203ecb491b6e8db3d992536e511e790cf11a23d 100644 --- a/src/services/consumptionDataManagerService.ts +++ b/src/services/consumptionDataManagerService.ts @@ -292,7 +292,7 @@ export default class ConsumptionDataManager implements IConsumptionDataManager { timeStep: TimeStep ): Promise<boolean> { const queryResult = await this._queryRunner.getEntries(fluideType, timeStep) - if (queryResult.length > 0) { + if (queryResult.data.length > 0) { return true } return false diff --git a/src/styles/components/_fluid.scss b/src/styles/components/_fluid.scss index e918cf6a52ed3ed47136a5820c989cc2a1f8bf3e..eefc82bf4df61ae03de2099b596aa8fa7a899322 100644 --- a/src/styles/components/_fluid.scss +++ b/src/styles/components/_fluid.scss @@ -90,7 +90,7 @@ } } } - + .fv-footer-challenge { width: 100%; max-width: 58.75rem; @@ -129,18 +129,24 @@ // Enedis Half Hour Load Activation .cta-box { - background-color:rgba(18, 18, 18, 0.7); + background-color: rgba(18, 18, 18, 0.8); position: absolute; - + left: 0; + width: calc(100vw - 220px); padding: 0rem 1rem 0rem 0rem; z-index: 1; display: flex; justify-content: center; + align-items: center; flex-direction: column; + height: 37.5rem; @media #{$large-phone} { - height: 26.5rem; + height: 29rem; + width: 100vw; + } + @media #{$tablet} { + width: 100vw; } - height: 34.5rem; .cta-box-header { text-align: center; @@ -148,10 +154,17 @@ letter-spacing: 0.2px; margin-bottom: 1.5em; color: $text-bright; + width: 50%; + @media #{$large-phone} { + width: 80%; + } } .cta-box-button { margin-left: auto; margin-right: auto; - width: 80%; + width: 50%; + @media #{$large-phone} { + width: 80%; + } } }