diff --git a/app/(home-pages)/notifications/CommentNotication.tsx b/app/(home-pages)/notifications/CommentNotication.tsx index 3b95e394..f9c669d5 100644 --- a/app/(home-pages)/notifications/CommentNotication.tsx +++ b/app/(home-pages)/notifications/CommentNotication.tsx @@ -52,29 +52,3 @@ export const CommentNotification = (props: HydratedCommentNotification) => { /> ); }; - -export const DummyCommentNotification = () => { - return ( - } - actionText={<>celine commented on your post} - content={ - - - - } - /> - ); -}; diff --git a/app/(home-pages)/notifications/Notification.tsx b/app/(home-pages)/notifications/Notification.tsx index a20f27bb..1402b6ff 100644 --- a/app/(home-pages)/notifications/Notification.tsx +++ b/app/(home-pages)/notifications/Notification.tsx @@ -1,19 +1,32 @@ import { Avatar } from "components/Avatar"; import { BaseTextBlock } from "app/lish/[did]/[publication]/[rkey]/BaseTextBlock"; -import { - PubLeafletDocument, - PubLeafletPublication, - PubLeafletRichtextFacet, -} from "lexicons/api"; +import { PubLeafletPublication, PubLeafletRichtextFacet } from "lexicons/api"; +import { useEntity, useReplicache } from "src/replicache"; export const Notification = (props: { icon: React.ReactNode; actionText: React.ReactNode; content?: React.ReactNode; + cardBorderHidden?: boolean; }) => { + let { rootEntity } = useReplicache(); + let cardBorderHidden = useEntity(rootEntity, "theme/card-border-hidden")?.data + .value; + return ( -
-
+
+
{props.icon}
{props.actionText}
@@ -32,8 +45,14 @@ export const ContentLayout = (props: { postTitle: string; publication: PubLeafletPublication.Record; }) => { + let { rootEntity } = useReplicache(); + let cardBorderHidden = useEntity(rootEntity, "theme/card-border-hidden")?.data + .value; + return ( -
+
{props.postTitle}
diff --git a/app/(home-pages)/notifications/NotificationList.tsx b/app/(home-pages)/notifications/NotificationList.tsx index 8c22f80a..b26a82d2 100644 --- a/app/(home-pages)/notifications/NotificationList.tsx +++ b/app/(home-pages)/notifications/NotificationList.tsx @@ -16,14 +16,10 @@ export function NotificationList({ markAsRead(); }, 500); }, []); - let { rootEntity } = useReplicache(); - - let showPageBackground = !useEntity(rootEntity, "theme/card-border-hidden") - ?.data.value; return (
-
+
{notifications.map((n) => { if (n.type === "comment") { n; diff --git a/app/(home-pages)/notifications/page.tsx b/app/(home-pages)/notifications/page.tsx index 8c0f08b2..9be3f1d3 100644 --- a/app/(home-pages)/notifications/page.tsx +++ b/app/(home-pages)/notifications/page.tsx @@ -10,7 +10,7 @@ export default async function Notifications() { return ( { let {