Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ node_modules/
.idea/
.vscode/
.cursor/mcp.json
.turbo/
10 changes: 10 additions & 0 deletions apps/blockwarriors-next/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ const nextConfig = {
// Set root to monorepo root for proper workspace package resolution
root: path.join(__dirname, '../../'),
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: '**.convex.cloud', // change this to prod on production
port: '',
pathname: '/api/storage/**',
},
],
},
};

export default nextConfig;
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ import {
Trophy,
Users,
User,
Swords,
Shield,
} from 'lucide-react';
import { Button } from '@/components/ui/button';
import Link from 'next/link';
import Image from 'next/image';
import {
Tooltip,
TooltipContent,
Expand Down Expand Up @@ -77,41 +80,47 @@ export function DashboardSidebar({ className = '' }: SidebarProps) {

const hasCompletedSetup = Boolean(userProfile?.first_name && userProfile?.team);

const setupButton = (
<NavButton href="/dashboard/setup" hasCompletedSetup={hasCompletedSetup}>
<div
className={cn(
'flex items-center gap-2',
hasCompletedSetup && 'opacity-70'
)}
>
<User className="h-4 w-4" />
{hasCompletedSetup ? 'Profile & Team' : 'Get Started (Required)'}
</div>
</NavButton>
);

return (
<div className={cn('pb-12 min-h-screen', className)}>
<div className="space-y-4 py-4">
<div className="px-4 py-4 border-b border-primary/20">
<div className="flex items-center gap-3">
<div className="h-10 w-10 rounded-full bg-primary/20 border border-primary/30 flex items-center justify-center">
<User className="h-5 w-5 text-primary" />
</div>
<div className="flex flex-col min-w-0">
<div className="font-semibold text-white truncate">
{userProfile?.first_name} {userProfile?.last_name}
{/* User Profile Header */}
<Link href={hasCompletedSetup ? '/dashboard/profile' : '/dashboard/setup'}>
<div className="px-4 py-4 border-b border-primary/20 hover:bg-secondary/30 transition-colors cursor-pointer">
<div className="flex items-center gap-3">
<div className="relative h-10 w-10 rounded-full bg-primary/20 border border-primary/30 overflow-hidden flex items-center justify-center flex-shrink-0">
{userProfile?.profile_image_url ? (
<Image
src={userProfile.profile_image_url}
alt="Profile"
fill
className="object-cover"
/>
) : (
<User className="h-5 w-5 text-primary" />
)}
</div>
<div className="text-sm text-primary/70 truncate">
{userProfile?.team ? userProfile.team.team_name : 'No Team'}
<div className="flex flex-col min-w-0">
<div className="font-semibold text-white truncate">
{userProfile?.first_name} {userProfile?.last_name}
</div>
<div className="text-sm text-primary/70 truncate">
{userProfile?.team ? userProfile.team.team_name : 'No Team'}
</div>
</div>
</div>
</div>
</div>
</Link>

<div className="px-3">
<div className="space-y-1">
{!hasCompletedSetup && setupButton}
{!hasCompletedSetup && (
<NavButton href="/dashboard/setup" hasCompletedSetup={hasCompletedSetup}>
<div className="flex items-center gap-2">
<User className="h-4 w-4" />
Get Started (Required)
</div>
</NavButton>
)}

<NavButton href="/dashboard" hasCompletedSetup={hasCompletedSetup}>
<div className="flex items-center gap-2">
Expand All @@ -128,7 +137,7 @@ export function DashboardSidebar({ className = '' }: SidebarProps) {
<NavButton href="/dashboard/teams" hasCompletedSetup={hasCompletedSetup}>
<div className="flex items-center gap-2">
<Users className="h-4 w-4" />
Teams
All Teams
</div>
</NavButton>
<NavButton href="/dashboard/leaderboard" hasCompletedSetup={hasCompletedSetup}>
Expand All @@ -137,6 +146,12 @@ export function DashboardSidebar({ className = '' }: SidebarProps) {
Leaderboard
</div>
</NavButton>
<NavButton href="/dashboard/tournaments" hasCompletedSetup={hasCompletedSetup}>
<div className="flex items-center gap-2">
<Swords className="h-4 w-4" />
Tournaments
</div>
</NavButton>
<NavButton href="/dashboard/practice" hasCompletedSetup={hasCompletedSetup}>
<div className="flex items-center gap-2">
<Gamepad2 className="h-4 w-4" />
Expand All @@ -145,8 +160,19 @@ export function DashboardSidebar({ className = '' }: SidebarProps) {
</NavButton>

{hasCompletedSetup && (
<div className="pt-4 mt-4 border-t border-border">
{setupButton}
<div className="pt-4 mt-4 border-t border-border space-y-1">
<NavButton href="/dashboard/profile" hasCompletedSetup={hasCompletedSetup}>
<div className="flex items-center gap-2">
<User className="h-4 w-4" />
My Profile
</div>
</NavButton>
<NavButton href="/dashboard/team" hasCompletedSetup={hasCompletedSetup}>
<div className="flex items-center gap-2">
<Shield className="h-4 w-4" />
My Team
</div>
</NavButton>
</div>
)}

Expand Down
Loading