From ad171587ef3f8cde8aa4264b9f8ccdbcbf7b8340 Mon Sep 17 00:00:00 2001 From: Morian Engelhardt Date: Sat, 30 Sep 2023 15:40:30 +0200 Subject: [PATCH] feat(blog): add blog comment notifications --- .env.development | 4 ++-- components/inbox-item.tsx | 25 +++++++++++++++++++++++++ components/wave-page.tsx | 2 +- context/blog-comments-section.tsx | 13 ++++++++++--- 4 files changed, 38 insertions(+), 6 deletions(-) diff --git a/.env.development b/.env.development index de5280d..876c8a2 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,3 @@ -NEXT_PUBLIC_BACKEND_DOMAIN=https://api.xp-bot.net -# NEXT_PUBLIC_BACKEND_DOMAIN=http://localhost:3300 +# NEXT_PUBLIC_BACKEND_DOMAIN=https://api.xp-bot.net +NEXT_PUBLIC_BACKEND_DOMAIN=http://localhost:3300 NEXT_PUBLIC_FLAGS_ENVIRONMENT_KEY=flags_pub_development_349193885386277458 \ No newline at end of file diff --git a/components/inbox-item.tsx b/components/inbox-item.tsx index d497896..0b188d2 100644 --- a/components/inbox-item.tsx +++ b/components/inbox-item.tsx @@ -63,6 +63,31 @@ const InboxItem: FC = ({ inboxItem }) => {

); + case InboxItemType.BlogPostComment: + return ( +
+ {lookupUser && ( + + + + )} +

+ {lookupUser?.username} commented: +

+
+ ); default: return (

= ({ children }) => { const router = useRouter(); return ( -

+
void; @@ -110,7 +117,7 @@ export function BlogCommentsSection({ {map( orderBy(comments, (comment) => comment.updatedAt, "desc"), (comment, idx) => ( - <> + 0 && !isEqual(idx, size(comments) - 1) && (
)} - +
) )}