From 5317439fe7733d7ca4a6ddb28db8d7d9100f4fc8 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Sat, 15 Nov 2025 09:15:37 +0000 Subject: [PATCH] Implement DEV-LINK Dashboard with profile editor, Roblox job feed, and teams cgen-e012e2b3274841b89bf0dd02976ba88a --- client/pages/dashboards/DevLinkDashboard.tsx | 350 ++++++++++++++----- 1 file changed, 272 insertions(+), 78 deletions(-) diff --git a/client/pages/dashboards/DevLinkDashboard.tsx b/client/pages/dashboards/DevLinkDashboard.tsx index 56ae8110..40ea5b5a 100644 --- a/client/pages/dashboards/DevLinkDashboard.tsx +++ b/client/pages/dashboards/DevLinkDashboard.tsx @@ -1,92 +1,286 @@ +import { useState, useEffect } from "react"; import { useNavigate } from "react-router-dom"; import Layout from "@/components/Layout"; import { Button } from "@/components/ui/button"; -import { Card, CardContent } from "@/components/ui/card"; -import { Database, ArrowRight, Briefcase, Users, Zap } from "lucide-react"; +import { useAuth } from "@/contexts/AuthContext"; +import { supabase } from "@/lib/supabase"; +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; +import { Badge } from "@/components/ui/badge"; +import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; +import LoadingScreen from "@/components/LoadingScreen"; +import { Code, Users, Briefcase, ExternalLink, ArrowRight, AlertCircle, Edit, Save } from "lucide-react"; + +const API_BASE = import.meta.env.VITE_API_BASE || ""; export default function DevLinkDashboard() { const navigate = useNavigate(); + const { user, loading: authLoading } = useAuth(); + const [activeTab, setActiveTab] = useState("overview"); + const [profile, setProfile] = useState(null); + const [opportunities, setOpportunities] = useState([]); + const [teams, setTeams] = useState([]); + const [loading, setLoading] = useState(true); + const [isEditing, setIsEditing] = useState(false); + + useEffect(() => { + if (!authLoading && user) { + loadDashboardData(); + } + }, [user, authLoading]); + + const loadDashboardData = async () => { + try { + setLoading(true); + const { data: { session } } = await supabase.auth.getSession(); + const token = session?.access_token; + if (!token) throw new Error("No auth token"); + + const profileRes = await fetch(`${API_BASE}/api/devlink/profile`, { + headers: { Authorization: `Bearer ${token}` }, + }); + if (profileRes.ok) setProfile(await profileRes.json()); + + const oppRes = await fetch(`${API_BASE}/api/devlink/opportunities`, { + headers: { Authorization: `Bearer ${token}` }, + }); + if (oppRes.ok) setOpportunities(await oppRes.json()); + + const teamsRes = await fetch(`${API_BASE}/api/devlink/teams`, { + headers: { Authorization: `Bearer ${token}` }, + }); + if (teamsRes.ok) setTeams(await teamsRes.json()); + } catch (error) { + console.error("Failed to load DEV-LINK data", error); + } finally { + setLoading(false); + } + }; + + if (authLoading || loading) { + return ; + } + + if (!user) { + return ( + +
+
+

+ DEV-LINK +

+

Roblox Developer Network

+ +
+
+
+ ); + } return ( -
-
+
+
{/* Header */} -
-
-
-
- -
-
-

- DEV-LINK Roblox Network -

-

- This is the future home for your specialized Roblox portfolio, team management, and B2B job feed per our EdTech GTM plan. -

-
- - {/* Coming Soon Card */} - - - {/* Status */} -
-
-

Coming Soon

-
-

- The full bespoke DEV-LINK dashboard with Roblox-specific portfolio tools, team management, and B2B job feeds is currently in development per our Phase 3 Roadmap. -

-
- - {/* Guiding CTA */} -
-
-

- - Find a Roblox Job Today -

-

- The DEV-LINK job board is already live! You can browse all open Roblox developer opportunities on our NEXUS marketplace right now. -

-
- -
-
-
- - {/* Features Coming */} -
- - -

🎨

-

Roblox Portfolio

-

Showcase your creations & experiences

-
-
- - -

👥

-

Team Management

-

Collaborate with Roblox teams

-
-
- - -

💼

-

Job Feed

-

B2B opportunities & contracts

-
-
-
+
+

+ DEV-LINK +

+

Roblox Developer Network | Vibrant Cyan

+ + {/* Tabs */} + + + Overview + Profile Editor + Roblox Jobs + Teams + + + {/* Overview Tab */} + +
+ + +

Profile Views

+

{profile?.profile_views || 0}

+
+
+ + +

Job Matches

+

{opportunities.length}

+
+
+ + +

Team Requests

+

{teams.length}

+
+
+
+ + {/* Quick Links */} +
+ + +

Browse Roblox Jobs

+ +
+
+ + +

Find a Teammate

+ +
+
+
+
+ + {/* Profile Editor Tab */} + + + + + My dev-link Profile Editor + + + Customize your Roblox portfolio + + + {/* Roblox Creations */} +
+

My Roblox Creations

+ {isEditing ? ( +