import XMarkIcon from '@heroicons/react/24/solid/XMarkIcon' import { useDispatch, useSelector } from 'react-redux' import NotificationBodyRightDrawer from '@/Components/features/common/components/NotificationBodyRightDrawer' import { closeRightDrawer } from '@/Components/features/common/rightDrawerSlice' import { RIGHT_DRAWER_TYPES } from '../.../../../../public/utils/globalConstantUtil' import CalendarEventsBodyRightDrawer from '@/Components/features/calendar/CalendarEventsBodyRightDrawer' function RightSidebar() { const { isOpen, bodyType, extraObject, header } = useSelector(state => state.rightDrawer) const dispatch = useDispatch() const close = (e) => { dispatch(closeRightDrawer(e)) } return (
{/* Header */}
{header}
{/* ------------------ Content Start ------------------ */}
{/* Loading drawer body according to different drawer type */} { { [RIGHT_DRAWER_TYPES.NOTIFICATION]: , [RIGHT_DRAWER_TYPES.CALENDAR_EVENTS]: , [RIGHT_DRAWER_TYPES.DEFAULT]:
}[bodyType] }
{/* ------------------ Content End ------------------ */}
close()} >
) } export default RightSidebar