/** @jsxImportSource @emotion/react */ import { INotification, useNotifications } from '@magicbell/react-headless'; import { useState } from 'react'; import NotificationList from '../NotificationList/index.js'; import { NotificationListItem } from '../NotificationList/NotificationList.js'; type NotificationStore = ReturnType; export interface NotificationInboxContentProps { height?: number; onNotificationClick?: (notification: INotification) => void; store: NotificationStore; NotificationItem?: NotificationListItem; } /** * Component that renders an infinite scroll list of notifications, or error * messages if the list can't be fetched. * * @example * */ export default function NotificationInboxContent({ onNotificationClick, store, height, NotificationItem, }: NotificationInboxContentProps) { // we use a refSetter so that the height observer is reattached on a ref change const [contentRef, setContentRef] = useState(null); return (
{contentRef ? ( ) : null}
); }