diff --git a/backend/cmd/server/tmp/main b/backend/cmd/server/tmp/main index 354eab3..c5a0738 100755 Binary files a/backend/cmd/server/tmp/main and b/backend/cmd/server/tmp/main differ diff --git a/frontend/src/app/profile/[username]/page.tsx b/frontend/src/app/profile/[username]/page.tsx index 1833225..febbbd4 100644 --- a/frontend/src/app/profile/[username]/page.tsx +++ b/frontend/src/app/profile/[username]/page.tsx @@ -1,18 +1,18 @@ -'use client'; +"use client"; -import { useState, useEffect } from 'react'; -import { useParams, useRouter } from 'next/navigation'; -import { api } from '../../../services/api'; -import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'; -import { Badge } from '@/components/ui/badge'; -import { Button } from '@/components/ui/button'; -import { LockIcon } from '@/app/icons/icon'; +import { useState, useEffect } from "react"; +import { useParams, useRouter } from "next/navigation"; +import { api } from "../../../services/api"; +import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; +import { Badge } from "@/components/ui/badge"; +import { Button } from "@/components/ui/button"; +import { LockIcon } from "@/app/icons/icon"; import { DiscordIcon, InstaIcon, TwitchIcon, YoutubeIcon, -} from '@/app/icons/icon'; +} from "@/app/icons/icon"; interface GameConnection { name: string; @@ -37,12 +37,12 @@ export default function UserProfileView() { const params = useParams(); const router = useRouter(); const [profile, setProfile] = useState({ - username: '', + username: "", connectedGames: [], isPrivate: false, followersCount: 0, followingCount: 0, - isFollowing: false + isFollowing: false, }); const [error, setError] = useState(null); @@ -52,8 +52,8 @@ export default function UserProfileView() { const data = await api.getUserProfile(params.username as string); setProfile(data); } catch (error) { - setError('Failed to load profile'); - console.error('Profile error:', error); + setError("Failed to load profile"); + console.error("Profile error:", error); } }; @@ -64,8 +64,8 @@ export default function UserProfileView() { if (error) { return ( -
-
{error}
+
+
{error}
); @@ -73,19 +73,21 @@ export default function UserProfileView() { if (!profile) { return ( -
-
+
+
); } if (profile.isPrivate) { return ( -
-
- -

This Account is Private

-

Follow this account to see their profile

+
+
+ +

This Account is Private

+

+ Follow this account to see their profile +

@@ -93,16 +95,17 @@ export default function UserProfileView() { } return ( -
-
-
- - +
+
Overlay Image
+
+
+ + {profile?.username?.[0]} -
-
@{profile?.username}
-
+
+
@{profile?.username}
+
{profile?.followersCount || 0} followers {profile?.followingCount || 0} following {profile?.connectedGames?.length || 0} games @@ -110,86 +113,93 @@ export default function UserProfileView() {
- {/* Connected Games */} -
-

Connected Games

- {profile?.connectedGames && profile.connectedGames.length > 0 ? ( -
- {profile.connectedGames.map((game, index) => ( -
- - {game.name} - - {(game.username || game.gameId) && ( -
- {game.username && ( -
Username: {game.username}
- )} - {game.gameId && ( -
Game ID: {game.gameId}
- )} -
- )} -
- ))} -
- ) : ( -

No games connected yet

- )} +
+ + + {profile?.username?.[0]} +
{/* Social Links */} -
-

Connected Accounts

-
+
+

Connected Accounts

+
{profile?.twitchUsername && ( - + )} {profile?.discordUsername && ( -
- + + {profile.discordUsername} -
+ )} {profile?.instagramHandle && ( - + )} {profile?.youtubeChannel && ( - + )}
+ + {/* Connected Games */} +
+

Connected Games

+ {profile?.connectedGames && profile.connectedGames.length > 0 ? ( +
+ {profile.connectedGames.map((game, index) => ( +
+ + {game.name} + + {(game.username || game.gameId) && ( +
+ {game.username &&
Username: {game.username}
} + {game.gameId &&
Game ID: {game.gameId}
} +
+ )} +
+ ))} +
+ ) : ( +

No games connected yet

+ )} +
); -} \ No newline at end of file +}