"use client" //import { useState } from "react" import { User, Users, Clock } from "lucide-react" import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar" import { Badge } from "@/components/ui/badge" //import { Button } from "@/components/ui/button" import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" //import { Input } from "@/components/ui/input" //import { Label } from "@/components/ui/label" //import { Switch } from "@/components/ui/switch" //import { Textarea } from "@/components/ui/textarea" interface DashboardState { gitUser: string; gitAvatar?: string; gitLastLogin?: string; gitFollowerCt: number; gitFollowingCt: number; gitIsAdmin: boolean; gitEmail?: string; } export const GitTab = ({ dashboardState }: { dashboardState: DashboardState }) => { /* This is disabled for later, so I can finish working on it. I want to focus on essential services first. const [newUsername, setNewUsername] = useState("") const [newPassword, setNewPassword] = useState("") const [newEmail, setNewEmail] = useState("") const [repoName, setRepoName] = useState("") const [isPrivate, setIsPrivate] = useState(false) const [repoDescription, setRepoDescription] = useState("") const [autoInit, setAutoInit] = useState(true) const handleUsernameChange = (e: React.FormEvent) => { e.preventDefault() console.log("Data:", newUsername) } const handlePasswordChange = (e: React.FormEvent) => { e.preventDefault() console.log("Changing password") } const handleEmailChange = (e: React.FormEvent) => { e.preventDefault() console.log("Data:", newEmail) } const handleCreateRepo = (e: React.FormEvent) => { e.preventDefault() console.log("Data:", { repoName, isPrivate, repoDescription, autoInit }) } */ const convDate = (dateStr: string) => { const date = new Date(dateStr); return date.toLocaleString(); } return (
Profile An overview of your LibreCloud Git account

{dashboardState.gitUser} {dashboardState.gitIsAdmin && Admin}

{dashboardState.gitFollowerCt} followers {dashboardState.gitFollowingCt} following
Last login: {dashboardState.gitLastLogin === "Never" ? "Never" : (dashboardState.gitLastLogin && convDate(dashboardState.gitLastLogin)) || "N/A"}
{/* This is disabled for later, so I can finish working on it. I want to focus on essential services first.
Change Username
setNewUsername(e.target.value)} />
Change Password
setNewPassword(e.target.value)} />
Change Email
a + "*".repeat(b.length)) || ""} disabled />
setNewEmail(e.target.value)} />
Create New Repository
setRepoName(e.target.value)} />