diff --git a/app/(home-pages)/notifications/CommentNotication.tsx b/app/(home-pages)/notifications/CommentNotication.tsx index c208c70c..eace88c3 100644 --- a/app/(home-pages)/notifications/CommentNotication.tsx +++ b/app/(home-pages)/notifications/CommentNotication.tsx @@ -7,6 +7,7 @@ import { import { HydratedCommentNotification } from "src/notifications"; import { blobRefToSrc } from "src/utils/blobRefToSrc"; import { Avatar } from "components/Avatar"; +import { CommentTiny } from "components/Icons/CommentTiny"; import { CommentInNotification, ContentLayout, @@ -19,10 +20,15 @@ export const CommentNotification = (props: HydratedCommentNotification) => { let commentRecord = props.commentData.record as PubLeafletComment.Record; let profileRecord = props.commentData.bsky_profiles ?.record as AppBskyActorProfile.Record; + const displayName = profileRecord.displayName || "Someone"; return ( } + actionText={ + <> + {displayName} commented on your post + + } content={ { export const DummyCommentNotification = () => { return ( } + actionText={<>celine commented on your post} content={ { + const identity = "celine"; + const pubName = "Pub Name Here"; return ( } + actionText={ + <> + {identity} followed {pubName}! + + } /> ); }; diff --git a/app/(home-pages)/notifications/MentionNotification.tsx b/app/(home-pages)/notifications/MentionNotification.tsx index 5ddf6f3e..0b93882b 100644 --- a/app/(home-pages)/notifications/MentionNotification.tsx +++ b/app/(home-pages)/notifications/MentionNotification.tsx @@ -1,10 +1,11 @@ +import { MentionTiny } from "components/Icons/MentionTiny"; import { ContentLayout, Notification } from "./Notification"; export const DummyPostMentionNotification = () => { return ( } + actionText={<>celine mentioned your post} content={ I'm just gonna put the description here. The surrounding context is @@ -24,8 +25,8 @@ export const DummyPostMentionNotification = () => { export const DummyUserMentionNotification = () => { return ( } + actionText={<>celine mentioned you} content={
diff --git a/app/(home-pages)/notifications/Notification.tsx b/app/(home-pages)/notifications/Notification.tsx index b94d9b6c..5ca9d9ef 100644 --- a/app/(home-pages)/notifications/Notification.tsx +++ b/app/(home-pages)/notifications/Notification.tsx @@ -1,58 +1,17 @@ import { Avatar } from "components/Avatar"; import { BaseTextBlock } from "app/lish/[did]/[publication]/[rkey]/BaseTextBlock"; -import { CommentTiny } from "components/Icons/CommentTiny"; -import { ReplyTiny } from "components/Icons/ReplyTiny"; import { PubLeafletRichtextFacet } from "lexicons/api"; -import { MentionTiny } from "components/Icons/MentionTiny"; -import { PubIcon } from "components/ActionBar/Publications"; export const Notification = (props: { - identity: string; - action: - | { type: "comment" } - | { type: "reply" } - | { type: "follow"; avatar: string | undefined; pubName: string } - | { type: "post-mention" } - | { type: "user-mention" }; - + icon: React.ReactNode; + actionText: React.ReactNode; content?: React.ReactNode; }) => { return (
-
- {props.action.type === "comment" ? ( - - ) : props.action.type === "reply" ? ( - - ) : props.action.type === "follow" ? ( - - ) : props.action.type === "post-mention" ? ( - - ) : props.action.type === "user-mention" ? ( - - ) : ( - "" - )} -
-
- {props.identity}{" "} - {props.action.type === "comment" - ? "commented on your post" - : props.action.type === "reply" - ? "replied to your comment" - : props.action.type === "follow" - ? `followed ${props.action.pubName}!` - : props.action.type === "post-mention" - ? `mentioned your post` - : props.action.type === "user-mention" - ? "mentioned you" - : "did something!"} -
+
{props.icon}
+
{props.actionText}
{props.content && (
diff --git a/app/(home-pages)/notifications/ReplyNotification.tsx b/app/(home-pages)/notifications/ReplyNotification.tsx index d32b7cc8..f272905e 100644 --- a/app/(home-pages)/notifications/ReplyNotification.tsx +++ b/app/(home-pages)/notifications/ReplyNotification.tsx @@ -1,5 +1,6 @@ import { Avatar } from "components/Avatar"; import { BaseTextBlock } from "app/lish/[did]/[publication]/[rkey]/BaseTextBlock"; +import { ReplyTiny } from "components/Icons/ReplyTiny"; import { CommentInNotification, ContentLayout, @@ -9,8 +10,8 @@ import { export const DummyReplyNotification = () => { return ( } + actionText={<>jared replied to your comment} content={