1+ 'use client'
2+ import Navbar from "@/components/dashboard/navbar"
3+ import Sidebar from "@/components/dashboard/sidebar"
4+ import { useSidebar } from "@/context/userSidebar" ;
5+ import { LogOut , LayoutDashboard , Trash2 } from "lucide-react"
6+ import Page from "@/components/dashboard/server/page" ;
7+ import JoinsAndLeaves from "@/components/dashboard/server/joinandleaves" ;
8+ import Messages from "@/components/dashboard/server/messages" ;
9+ import Link from "next/link" ;
10+ import { useState , useEffect } from "react" ;
11+ import AuditLogsTable from "@/components/dashboard/server/home_log" ;
12+ import { motion , AnimatePresence } from "framer-motion" ;
13+ import { HexColorPicker } from "react-colorful" ;
14+ import { useRouter } from "next/navigation" ;
15+
16+ export default function Dashboard ( ) {
17+
18+ const [ isOpen , setIsOpen ] = useState ( false ) ;
19+ const [ open , setOpen ] = useState ( false ) ;
20+ const [ color , setColor ] = useState ( "#3357FF" ) ;
21+ const router = useRouter ( ) ;
22+
23+ const addCommas = ( num ) => {
24+ return num . toString ( ) . replace ( / \B (? = ( \d { 3 } ) + (? ! \d ) ) / g, "," ) ;
25+ } ;
26+
27+
28+ function darken ( hex , amount = 20 ) {
29+ let col = hex . replace ( '#' , '' )
30+ if ( col . length === 3 )
31+ col = col . split ( '' ) . map ( c => c + c ) . join ( '' )
32+ const num = parseInt ( col , 16 )
33+ let r = ( num >> 16 ) - amount
34+ let g = ( ( num >> 8 ) & 0x00ff ) - amount
35+ let b = ( num & 0x0000ff ) - amount
36+ r = r < 0 ? 0 : r
37+ g = g < 0 ? 0 : g
38+ b = b < 0 ? 0 : b
39+ return `#${ ( r << 16 | g << 8 | b ) . toString ( 16 ) . padStart ( 6 , '0' ) } `
40+ }
41+
42+ const formatted = addCommas ( "1250000" )
43+
44+ return (
45+ < >
46+
47+ < div className = "flex flex-col md:flex-row md:items-center gap-1 md:gap-4 mb-4" >
48+ < h2 className = "text-white flex space-x-2 font-medium text-lg md:text-xl" >
49+ < svg xmlns = "http://www.w3.org/2000/svg" width = { 24 } height = { 24 } className = "w-6.5 h-6.5" viewBox = "0 0 24 24" >
50+ < g fill = "none" stroke = "currentColor" strokeWidth = { 2 } >
51+ < path d = "M16.308 4.384c-.59 0-.886 0-1.155-.1l-.111-.046c-.261-.12-.47-.328-.888-.746c-.962-.962-1.443-1.443-2.034-1.488a2 2 0 0 0-.24 0c-.591.045-1.072.526-2.034 1.488c-.418.418-.627.627-.888.746l-.11.046c-.27.1-.565.1-1.156.1h-.11c-1.507 0-2.261 0-2.73.468s-.468 1.223-.468 2.73v.11c0 .59 0 .886-.1 1.155q-.022.057-.046.111c-.12.261-.328.47-.746.888c-.962.962-1.443 1.443-1.488 2.034a2 2 0 0 0 0 .24c.045.591.526 1.072 1.488 2.034c.418.418.627.627.746.888q.025.054.046.11c.1.27.1.565.1 1.156v.11c0 1.507 0 2.261.468 2.73s1.223.468 2.73.468h.11c.59 0 .886 0 1.155.1q.057.021.111.046c.261.12.47.328.888.746c.962.962 1.443 1.443 2.034 1.488q.12.009.24 0c.591-.045 1.072-.526 2.034-1.488c.418-.418.627-.626.888-.746q.054-.025.11-.046c.27-.1.565-.1 1.156-.1h.11c1.507 0 2.261 0 2.73-.468s.468-1.223.468-2.73v-.11c0-.59 0-.886.1-1.155q.021-.057.046-.111c.12-.261.328-.47.746-.888c.962-.962 1.443-1.443 1.488-2.034q.009-.12 0-.24c-.045-.591-.526-1.072-1.488-2.034c-.418-.418-.626-.627-.746-.888l-.046-.11c-.1-.27-.1-.565-.1-1.156v-.11c0-1.507 0-2.261-.468-2.73s-1.223-.468-2.73-.468z" > </ path >
52+ < path d = "M15.5 12a3.5 3.5 0 1 1-7 0a3.5 3.5 0 0 1 7 0Z" > </ path >
53+ </ g >
54+ </ svg >
55+ < span > Giveaway Settings</ span >
56+ </ h2 >
57+
58+ </ div >
59+ < hr className = "border-[#302e46] mb-4" />
60+
61+
62+
63+
64+
65+ </ >
66+ )
67+ }
0 commit comments