"use client"; import { useEffect, useState } from "react"; import { DashboardPageLayout } from "./DashboardPageLayout"; import { NotificationList } from "app/(home-pages)/(writer)/notifications/NotificationList"; import { getNotifications } from "app/(home-pages)/(writer)/notifications/getNotifications"; import { HydratedNotification } from "src/notifications"; export function NotificationContent() { let [notifications, setNotifications] = useState< HydratedNotification[] | null >(null); useEffect(() => { getNotifications().then(setNotifications); }, []); return ( {notifications === null ? (
) : ( )} ); }