diff --git a/components/Shoutbox.tsx b/components/Shoutbox.tsx
index ee2e8c4..4aeaf84 100644
--- a/components/Shoutbox.tsx
+++ b/components/Shoutbox.tsx
@@ -38,7 +38,10 @@ const Shoutbox = () => {
useEffect(() => {
const newSocket = io(
process.env.NEXT_PUBLIC_SHOUTBOX_SOCKET || "http://localhost:4000",
- { withCredentials: true },
+ {
+ withCredentials: true,
+ path: "/socket.io",
+ },
);
setSocket(newSocket);
diff --git a/components/UserProfile.tsx b/components/UserProfile.tsx
index c66c756..164b963 100644
--- a/components/UserProfile.tsx
+++ b/components/UserProfile.tsx
@@ -5,6 +5,11 @@ import Link from "next/link";
import { motion, AnimatePresence } from "framer-motion";
import customEmojis from "@/models/custom-emojis";
import Image from "next/image";
+import dynamic from "next/dynamic";
+
+const ErrorBoundary = dynamic(() => import("@/components/ErrorBoundary"), {
+ ssr: false,
+});
const apiUrl = process.env.NEXT_PUBLIC_APP_URL || "http://localhost:3000";
@@ -27,13 +32,14 @@ export default function UserProfile({
const [userReputations, setReputations] = useState(0);
const [userLikes, setUserLikes] = useState(0);
const [userThreads, setUserThreads] = useState(0);
+ const [signature, setSignature] = useState(user.signature);
// TODO: Implement awards system API retrival
const awards = [
{ name: "Diamond.svg" },
- { name: "Diamond.svg" },
- { name: "Diamond.svg" },
- { name: "Diamond.svg" },
+ // { name: "Diamond.svg" },
+ // { name: "Diamond.svg" },
+ // { name: "Diamond.svg" },
// Add more awards as needed
];
@@ -111,6 +117,7 @@ export default function UserProfile({
setReputations(data.reputation);
setUserLikes(data.likes_received);
setUserThreads(data.threads_count);
+ setSignature(data.signature);
} else {
console.error("Failed to fetch user data");
}
@@ -120,7 +127,7 @@ export default function UserProfile({
};
fetchData();
- });
+ }, [user.username]);
const renderContentWithEmojisAndBBCode = (content: string) => {
if (!content) {
@@ -239,352 +246,361 @@ export default function UserProfile({
};
return (
-
-
-
-
-
-
-
-
-
+
+
+
+
+
- {user.username}
-
-
- {user.banned ? "Banned" : user.user_group}
-
-
+
{
+ e.target.onerror = null;
+ e.target.src = "/winter_soldier.gif";
+ }}
+ blurDataURL="/winter_soldier.gif"
+ priority
+ />
+
+
+
+ {user.username}
+
+
+ {user.banned ? "Banned" : user.user_group}
+
+
+
-
-
-
-
- {/* Left Column */}
-
- {/* Reputation and Likes */}
-
-
-
-
= 0 ? "text-green-500" : "text-red-500"}`}
- >
- {userReputations}
-
-
Reputation
-
-