11import { useState , useEffect } from 'react' ;
2- import {
3- Container ,
4- Row ,
5- Col ,
6- Card ,
7- CardBody ,
8- Button ,
9- Input ,
10- Dropdown ,
11- DropdownToggle ,
12- DropdownMenu ,
13- DropdownItem ,
14- } from 'reactstrap' ;
15- import { useHistory } from 'react-router-dom' ; // For React Router v5
2+ import { Container , Row , Col , Card , CardBody , Button , Input } from 'reactstrap' ;
163import './CPDashboard.css' ;
174import { FaCalendarAlt , FaMapMarkerAlt , FaUserAlt } from 'react-icons/fa' ;
185
196export function CPDashboard ( ) {
207 const [ events , setEvents ] = useState ( [ ] ) ;
218 const [ search , setSearch ] = useState ( '' ) ;
22- const [ dropdownOpen , setDropdownOpen ] = useState ( false ) ;
23- const history = useHistory ( ) ; // Use useHistory for navigation
249
2510 useEffect ( ( ) => {
2611 const mockEvents = [
@@ -52,12 +37,6 @@ export function CPDashboard() {
5237 setEvents ( mockEvents ) ;
5338 } , [ ] ) ;
5439
55- const toggleDropdown = ( ) => setDropdownOpen ( ! dropdownOpen ) ;
56-
57- const handleNavigation = path => {
58- history . push ( path ) ; // Navigate to the selected path
59- } ;
60-
6140 return (
6241 < Container fluid className = "dashboard-container" >
6342 < header className = "dashboard-header" >
@@ -72,7 +51,7 @@ export function CPDashboard() {
7251 className = "dashboard-search"
7352 />
7453 </ div >
75- < Dropdown isOpen = { dropdownOpen } toggle = { toggleDropdown } className = "community-dropdown" >
54+ { /* <Dropdown isOpen={dropdownOpen} toggle={toggleDropdown} className="community-dropdown">
7655 <DropdownToggle caret color="secondary">
7756 Community Portal
7857 </DropdownToggle>
@@ -82,7 +61,7 @@ export function CPDashboard() {
8261 <DropdownItem onClick={() => handleNavigation('/about')}>About Us</DropdownItem>
8362 <DropdownItem onClick={() => handleNavigation('/contact')}>Contact</DropdownItem>
8463 </DropdownMenu>
85- </ Dropdown >
64+ </Dropdown> */ }
8665 </ div >
8766 </ header >
8867
0 commit comments