react-icons/fa#FaBellSlash JavaScript Examples

The following examples show how to use react-icons/fa#FaBellSlash. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: NotificationsList.js    From viade_en1b with MIT License 5 votes vote down vote up
export function NotificationsList(props) {
  const { userWebId, loadRoutes } = props;
  let notifications = useNotifications(userWebId);
  const handleOnClick = () => {
    checkInboxForSharedRoutes(userWebId).then((routes) => {
      loadRoutes();
    });
  };

  const notificationsComponent = notifications.map((notification, key) => {
    return (
      <Notification
        data-testid="notification"
        key={key}
        notification={notification}
      ></Notification>
    );
  });
  return (
    <div
      data-testid="notificationslist-div"
      className={
        style.notificationsListContainer
          ? style.notificationsListContainer
          : "notification-list-div"
      }
    >
      <h1>
        <FormattedMessage id="Notifications" />
      </h1>
      <div
        data-testid="notificationslist-divcomponent"
        className={
          notifications.length === 0
            ? style.notificationsEmpty
            : style.notificationsList
        }
      >
        {notifications.length === 0 ? (
          <FaBellSlash></FaBellSlash>
        ) : (
          notificationsComponent
        )}
      </div>{" "}
      <div
        className={
          notifications.length === 0
            ? style.acceptAllButtonDisabled
            : style.acceptAllButton
        }
      >
        <ViadeModal
          data-testid="notificationslist-button"
          onOpen={handleOnClick}
          disabled={false}
          toggleText={<FormattedMessage id="Accepts" />}
          handleClose={() => {}}
          onSave={() => {}}
          closeText={<FormattedMessage id="Close" />}
        >
          <FormattedMessage id="AcceptsMessage" />
        </ViadeModal>
      </div>
    </div>
  );
}