<commit_before>import { NotificationsProvider } from '@strapi/helper-plugin';
import React, { useReducer } from 'react';
import PropTypes from 'prop-types';
import { Box } from '@strapi/parts/Box';
import { Stack } from '@strapi/parts/Stack';
import Notification from './Notification';
import reducer, { initialState } from './reducer';
import NotificationsWrapper from './Wrapper';

const Notifications = ({ children }) => {
  const [{ notifications }, dispatch] = useReducer(reducer, initialState);

  const displayNotification = config => {
    dispatch({
      type: 'SHOW_NOTIFICATION',
      config,
    });
  };

  return (
    <NotificationsProvider toggleNotification={displayNotification}>
      <NotificationsWrapper justifyContent="space-around">
        <Stack size={notifications.length}>
          {notifications.map(notification => {
            return (
              <Box key={notification.id} style={{ width: 500 }}>
                <Notification dispatch={dispatch} notification={notification} />
              </Box>
            );
          })}
        </Stack>
      </NotificationsWrapper>
      {children}
    </NotificationsProvider>
  );
};
<commit_msg>attempt to fix notification<commit_after>import { NotificationsProvider } from '@strapi/helper-plugin';
import React, { useReducer } from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import { Stack } from '@strapi/parts/Stack';
import Notification from './Notification';
import reducer, { initialState } from './reducer';

const CustomStack = styled(Stack)`
  margin-left: -250px;
`;

const Notifications = ({ children }) => {
  const [{ notifications }, dispatch] = useReducer(reducer, initialState);

  const displayNotification = config => {
    dispatch({
      type: 'SHOW_NOTIFICATION',
      config,
    });
  };

  return (
    <NotificationsProvider toggleNotification={displayNotification}>
      <CustomStack
        left="50%"
        position="fixed"
        size={2}
        top={`${46 / 16}rem`}
        width={`${500 / 16}rem`}
        zIndex={10}
      >
        {notifications.map(notification => {
          return (
            <Notification key={notification.id} dispatch={dispatch} notification={notification} />
          );
        })}
      </CustomStack>
      {children}
    </NotificationsProvider>
  );
};

{'fraction_non_alphanumeric': 0.1375796178343949, 'fraction_numerical': 0.008492569002123142, 'mean_word_length': 3.0481099656357387, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '980580', 'n_tokens_mistral': 647, 'n_tokens_neox': 618, 'n_words': 145}