diff --git a/client/src/components/AppHeader.tsx b/client/src/components/AppHeader.tsx
index 9596866..8b5061a 100644
--- a/client/src/components/AppHeader.tsx
+++ b/client/src/components/AppHeader.tsx
@@ -30,7 +30,7 @@ const AppHeader = () => {
- {meInfo.data &&
}
+ {meInfo.data ?
: null}
{meInfo.data && }
diff --git a/client/src/components/Avatar.tsx b/client/src/components/Avatar.tsx
index 742545f..3b06c89 100644
--- a/client/src/components/Avatar.tsx
+++ b/client/src/components/Avatar.tsx
@@ -2,9 +2,12 @@ import gravatar from 'gravatar';
import { useState } from 'react';
const Avatar = ({ user }: any) => {
+ // console.log(user);
+
const initials = user.firstName[0] + user.lastName[0];
const gravatarUrl = gravatar.url(user.email, { s: '64', r: 'x', d: '404' }, true);
const avatarUi = `https://ui-avatars.com/api/?name=${initials}&background=0D8ABC&color=fff&size=64`;
+ // const avatarUi = `https://ui-avatars.com/api/?name=GD&background=0D8ABC&color=fff&size=64`;
const [avatar, setAvatar] = useState(avatarUi);
const [firstLoad, setFirstLoad] = useState(true);
diff --git a/client/src/components/Message.tsx b/client/src/components/Message.tsx
index dbf1e65..6ee7eed 100644
--- a/client/src/components/Message.tsx
+++ b/client/src/components/Message.tsx
@@ -34,7 +34,7 @@ const Message = ({ message }: any) => {
toastError(error as string);
},
});
-
+
return (
<>
{
{message.author &&
}
- {(me.data?.id === message.author.id) || (me.data?.role === 'ADMIN') ? (
+ {me.data?.id === message.author.id || me.data?.role === 'ADMIN' || me.data?.role === 'CREATOR' ? (
) : null}
@@ -60,7 +60,14 @@ const Message = ({ message }: any) => {
minute: 'numeric',
})}
-
0 && message.likedBy.find((like: any) => like.userId === me.data?.id)) ? true : false} />
+ {me.data?.id === message.author.id ? null : (
+ 0 && message.likedBy.find((like: any) => like.userId === me.data?.id) ? true : false
+ }
+ />
+ )}
>
diff --git a/client/src/components/Modal.tsx b/client/src/components/Modal.tsx
index f99591c..d82e1cc 100644
--- a/client/src/components/Modal.tsx
+++ b/client/src/components/Modal.tsx
@@ -1,13 +1,11 @@
-import { ReactNode } from "react";
+import { ReactNode } from 'react';
-const Modal = ({ children, show, className = '' }: { children: ReactNode; show: boolean, className?: string }) => {
+const Modal = ({ children, show, className = '' }: { children: ReactNode; show: boolean; className?: string }) => {
+ if (!show) {
+ return null;
+ }
return (
-
+
diff --git a/client/src/components/User.tsx b/client/src/components/User.tsx
index 3a640b8..ea24dcf 100644
--- a/client/src/components/User.tsx
+++ b/client/src/components/User.tsx
@@ -59,7 +59,7 @@ const User = ({ author }: any) => {
return (