-
- {message.author.firstName} {message.author.lastName}
-
+ {message.author &&
}
{(me.data?.id === message.author.id) || (me.data?.role === 'ADMIN') ? (
) : null}
diff --git a/client/src/components/MessageWrapper.tsx b/client/src/components/MessageWrapper.tsx
index 0cfae61..a42094c 100644
--- a/client/src/components/MessageWrapper.tsx
+++ b/client/src/components/MessageWrapper.tsx
@@ -20,8 +20,8 @@ const MessageWrapper = () => {
}
return (
-
-
+
+
{isLoading
? ''
: isError
diff --git a/client/src/components/ScrollToBottom.tsx b/client/src/components/ScrollToBottom.tsx
index 0b4fa32..6274c68 100644
--- a/client/src/components/ScrollToBottom.tsx
+++ b/client/src/components/ScrollToBottom.tsx
@@ -33,15 +33,15 @@ const ScrollToBottom = ({ children, className = '' }: { children: ReactNode; cla
{children}
-
+
>
);
};
diff --git a/client/src/components/User.tsx b/client/src/components/User.tsx
new file mode 100644
index 0000000..aee8875
--- /dev/null
+++ b/client/src/components/User.tsx
@@ -0,0 +1,29 @@
+import { useState } from 'react';
+import Modal from './Modal';
+
+const User = ({ author }: any) => {
+ const [show, setShow] = useState(false);
+
+ return (
+ <>
+
+
+
+
+
User info
+
First name: {author.firstName}
+
Last name: {author.lastName}
+
Email: {author.email}
+
+
+
+
+ >
+ );
+};
+
+export default User;