diff --git a/components/ShoutBox/nameformatter.tsx b/components/ShoutBox/nameformatter.tsx
index ba67aef..e6ecaaf 100644
--- a/components/ShoutBox/nameformatter.tsx
+++ b/components/ShoutBox/nameformatter.tsx
@@ -16,14 +16,26 @@ const NameFormatter = ({ name, timestamp, telegram }: NameFormatterProps) => {
className={`flex items-center pr-2 text-sm font-bold ${findStyle(name)}`}
>
{name}
- {telegram ?
: null}
- {
- time ? (
- {time}
- ) : null
- }
-
+ {telegram ? (
+
+ ) : null}
+ {time ? (
+ {time}
+ ) : null}
+
);
};
diff --git a/components/ShoutBox/shoutbox.tsx b/components/ShoutBox/shoutbox.tsx
index 80edf38..b2592df 100644
--- a/components/ShoutBox/shoutbox.tsx
+++ b/components/ShoutBox/shoutbox.tsx
@@ -30,7 +30,7 @@ export const ChatWrapper = () => {
@@ -106,7 +106,7 @@ const Chat = ({ limit, isOpen }: ShoutBoxProps) => {
}, []);
function addMessage(message: any) {
- setMessages((messages) => [...messages, message].slice(-limit));
+ setMessages((messages) => [message, ...messages].slice(0, limit));
}
function submitMessage(messageString: string) {
@@ -146,7 +146,7 @@ const Chat = ({ limit, isOpen }: ShoutBoxProps) => {
{messages.map((message, index) => (