00Boobs00 commited on
Commit
ba24432
·
verified ·
1 Parent(s): 1b2c803

Upload pages/_app.js with huggingface_hub

Browse files
Files changed (1) hide show
  1. pages/_app.js +56 -0
pages/_app.js ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import '../styles/globals.css'
2
+ import { useState, useEffect } from 'react'
3
+ import { Shield } from 'lucide-react'
4
+
5
+ function MyApp({ Component, pageProps }) {
6
+ const [isDarkMode, setIsDarkMode] = useState(true)
7
+
8
+ useEffect(() => {
9
+ const savedTheme = localStorage.getItem('theme')
10
+ if (savedTheme) {
11
+ setIsDarkMode(savedTheme === 'dark')
12
+ }
13
+ }, [])
14
+
15
+ const toggleTheme = () => {
16
+ const newTheme = !isDarkMode
17
+ setIsDarkMode(newTheme)
18
+ localStorage.setItem('theme', newTheme ? 'dark' : 'light')
19
+ }
20
+
21
+ return (
22
+ <div className={isDarkMode ? 'dark' : ''}>
23
+ <div className="min-h-screen bg-white dark:bg-dark-900 text-dark-900 dark:text-dark-100 transition-colors duration-300">
24
+ <header className="border-b border-dark-200 dark:border-dark-700">
25
+ <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
26
+ <div className="flex justify-between items-center h-16">
27
+ <div className="flex items-center space-x-3">
28
+ <Shield className="h-8 w-8 text-primary-500" />
29
+ <h1 className="text-xl font-bold">SecureAgent Platform</h1>
30
+ </div>
31
+ <div className="flex items-center space-x-4">
32
+ <a
33
+ href="https://huggingface.co/spaces/akhaliq/anycoder"
34
+ target="_blank"
35
+ rel="noopener noreferrer"
36
+ className="text-sm text-primary-500 hover:text-primary-400 transition-colors"
37
+ >
38
+ Built with anycoder
39
+ </a>
40
+ <button
41
+ onClick={toggleTheme}
42
+ className="p-2 rounded-lg bg-dark-100 dark:bg-dark-800 hover:bg-dark-200 dark:hover:bg-dark-700 transition-colors"
43
+ >
44
+ {isDarkMode ? '☀️' : '🌙'}
45
+ </button>
46
+ </div>
47
+ </div>
48
+ </div>
49
+ </header>
50
+ <Component {...pageProps} />
51
+ </div>
52
+ </div>
53
+ )
54
+ }
55
+
56
+ export default MyApp