import React from "react";
import GuestAnnouncement from "./GuestAnnouncement";
import UserAnnouncement from "./UserAnnouncement";
import { usePermissions } from "../../../hooks";

const AnnouncementsSection = () => {
  const { loading, isGuest, isUser } = usePermissions();
  if (loading) return "";
  return (
    <>
      {isUser && <UserAnnouncement />}
      {isGuest && <GuestAnnouncement />}
    </>
  );
};

export default AnnouncementsSection;
