<commit_before>import { Helmet } from "react-helmet";
import React from "react";
import styled from "styled-components";

import style from "@agir/front/genericComponents/_variables.scss";

import { useSelector } from "@agir/front/globalContext/GlobalContext";
import {
  getIsConnected,
  getIsSessionLoaded,
} from "@agir/front/globalContext/reducers";

import Agenda from "@agir/events/agendaPage/Agenda";
import ConnectivityWarning from "@agir/front/app/ConnectivityWarning";
import Homepage from "@agir/front/app/Homepage/Home";
import Layout from "@agir/front/dashboardComponents/Layout";
import TellMorePage from "@agir/front/authentication/Connexion/TellMore/TellMorePage";
import TopBar from "@agir/front/allPages/TopBar";

const StyledWrapper = styled.div`
  padding-top: 72px;

  @media (max-width: ${style.collapse}px) {
    padding-top: 56px;
  }
`;

const AgendaPage = (props) => {
  const isConnected = useSelector(getIsConnected);
  const isSessionLoaded = useSelector(getIsSessionLoaded);

  if (!isSessionLoaded) {
    return null;
  }

  if (!isConnected) {
    return (
      <>
        <ConnectivityWarning hasTopBar={false} />
        <Homepage />
      </>
    );
  }

  return (
    <>
      <TopBar />
      <ConnectivityWarning hasTopBar />
      <TellMorePage />
      <StyledWrapper>
        <Layout active="events" smallBackgroundColor={style.black25} hasBanner>
          <Helmet>
            <title>Événements - Action populaire</title>
          </Helmet>
          <Agenda {...props} />
        </Layout>
      </StyledWrapper>
    </>
  );
};

export default AgendaPage;<commit_msg>feat: handle space added from fixed banner<commit_after>import { Helmet } from "react-helmet";
import React from "react";
import styled from "styled-components";

import style from "@agir/front/genericComponents/_variables.scss";
import Spacer from "@agir/front/genericComponents/Spacer";

import { useIsDesktop } from "@agir/front/genericComponents/grid.js";
import { useMobileApp } from "@agir/front/app/hooks.js";
import { useSelector } from "@agir/front/globalContext/GlobalContext";
import {
  getIsConnected,
  getIsSessionLoaded,
} from "@agir/front/globalContext/reducers";

import Agenda from "@agir/events/agendaPage/Agenda";
import ConnectivityWarning from "@agir/front/app/ConnectivityWarning";
import Homepage from "@agir/front/app/Homepage/Home";
import Layout from "@agir/front/dashboardComponents/Layout";
import TellMorePage from "@agir/front/authentication/Connexion/TellMore/TellMorePage";
import TopBar from "@agir/front/allPages/TopBar";
import { useCustomAnnouncement } from "@agir/activity/common/hooks";

const StyledWrapper = styled.div`
  padding-top: 72px;

  @media (max-width: ${style.collapse}px) {
    padding-top: 56px;
  }
`;

const AgendaPage = (props) => {
  const isConnected = useSelector(getIsConnected);
  const isSessionLoaded = useSelector(getIsSessionLoaded);

  const [hasBannerDownload, _] = useCustomAnnouncement("bannerDownload");
  const isDesktop = useIsDesktop();
  const { isMobileApp } = useMobileApp();

  if (!isSessionLoaded) {
    return null;
  }

  if (!isConnected) {
    return (
      <>
        <ConnectivityWarning hasTopBar={false} />
        <Homepage />
      </>
    );
  }

  return (
    <>
      <TopBar />
      <ConnectivityWarning hasTopBar />
      <TellMorePage />

      {!isMobileApp && !isDesktop && hasBannerDownload && (
        <Spacer size="100px" />
      )}

      <StyledWrapper>
        <Layout active="events" smallBackgroundColor={style.black25} hasBanner>
          <Helmet>
            <title>Événements - Action populaire</title>
          </Helmet>
          <Agenda {...props} />
        </Layout>
      </StyledWrapper>
    </>
  );
};

export default AgendaPage;
{'fraction_non_alphanumeric': 0.13043478260869565, 'fraction_numerical': 0.003976670201484623, 'mean_word_length': 3.551266586248492, 'pattern_counts': {'":': 0, '<': 40, '<?xml version=': 0, '>': 42, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '667295', 'n_tokens_mistral': 1208, 'n_tokens_neox': 1171, 'n_words': 235}