diff --git a/components/Navbar.jsx b/components/Navbar.jsx index c268629..64694c3 100644 --- a/components/Navbar.jsx +++ b/components/Navbar.jsx @@ -14,6 +14,7 @@ import { IoClose, IoMenu, IoChatboxEllipsesOutline, + IoDocumentTextOutline, } from 'react-icons/io5' import { HiOutlineDocumentPlus } from 'react-icons/hi2' import { Tooltip } from 'react-tooltip' @@ -203,6 +204,24 @@ const Navbar = ({ )} + {customClaims.admin && ( + + )}
{(customClaims.admin || customClaims.agency) && ( diff --git a/pages/dashboard.jsx b/pages/dashboard.jsx index a7884b2..866999b 100644 --- a/pages/dashboard.jsx +++ b/pages/dashboard.jsx @@ -13,6 +13,7 @@ import { db, auth } from '../config/firebase' import LanguageSwitcher from '../components/LanguageSwitcher' import { serverSideTranslations } from 'next-i18next/serverSideTranslations' import Head from 'next/head' +import HelpRequests from '../components/HelpRequests' const tabList = [ 'Home', 'Profile', @@ -38,20 +39,20 @@ const Dashboard = () => { const router = useRouter() const [agencyUpdateSubmitted, setAgencyUpdateSubmitted] = useState(0) - - const [newReportModal,setNewReportModal] = useState(false) - const [newReportSubmitted,setNewReportSubmitted] = useState(0) + + const [newReportModal,setNewReportModal] = useState(false) + const [newReportSubmitted,setNewReportSubmitted] = useState(0) const handleNewReportSubmit = () => { // increment the newReportSubmitted - setNewReportSubmitted((prevState) => prevState + 1) - setNewReportModal(false) + setNewReportSubmitted((prevState) => prevState + 1) + setNewReportModal(false) + } + + const handleNewReportClick = () => { + setNewReportModal(true) // Open the modal when the button is clicked } - const handleNewReportClick = () => { - setNewReportModal(true) // Open the modal when the button is clicked - } - const handleAgencyUpdateSubmit = () => { // increment the agencyUpdateSubmitted setAgencyUpdateSubmitted((prevState) => prevState + 1) @@ -108,6 +109,7 @@ const Dashboard = () => { {tab == 4 && customClaims.admin && ( )} + {tab == 5 && customClaims.admin && }
{/* Render the NewReportModal */} {newReportModal && (