Matt6134 commited on
Commit
36e4335
·
verified ·
1 Parent(s): 4227950

Upload pages/index.js with huggingface_hub

Browse files
Files changed (1) hide show
  1. pages/index.js +63 -0
pages/index.js ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import React, { useState } from 'react';
2
+ import { motion, AnimatePresence } from 'framer-motion';
3
+ import Head from 'next/head';
4
+ import HomeView from '../components/views/HomeView';
5
+ import MobileNav from '../components/layout/MobileNav';
6
+
7
+ export default function HomePage() {
8
+ const [activeView, setActiveView] = useState('home');
9
+ const [isMobile, setIsMobile] = useState(true);
10
+
11
+ // Simple detection for demo purposes
12
+ React.useEffect(() => {
13
+ const checkMobile = () => setIsMobile(window.innerWidth < 768);
14
+ checkMobile();
15
+ window.addEventListener('resize', checkMobile);
16
+ return () => window.removeEventListener('resize', checkMobile);
17
+ }, []);
18
+
19
+ return (
20
+ <>
21
+ <Head>
22
+ <title>Horoly | Luxury Watch Marketplace</title>
23
+ <meta name="description" content="Discover authenticated luxury timepieces" />
24
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
25
+ <link rel="icon" href="/favicon.ico" />
26
+ </Head>
27
+
28
+ <div className="min-h-screen bg-black relative">
29
+ {/* AnyCoder Attribution */}
30
+ <a
31
+ href="https://huggingface.co/spaces/akhaliq/anycoder"
32
+ target="_blank"
33
+ rel="noopener noreferrer"
34
+ className="fixed top-4 left-4 z-[60] text-xs text-white/30 hover:text-white/60 transition-colors font-mono"
35
+ >
36
+ Built with anycoder
37
+ </a>
38
+
39
+ {/* Main Content */}
40
+ <AnimatePresence mode="wait">
41
+ <motion.div
42
+ key={activeView}
43
+ initial={{ opacity: 0, y: 10 }}
44
+ animate={{ opacity: 1, y: 0 }}
45
+ exit={{ opacity: 0, y: -10 }}
46
+ transition={{ duration: 0.2 }}
47
+ className="h-full"
48
+ >
49
+ {activeView === 'home' && <HomeView isMobile={isMobile} />}
50
+ {activeView !== 'home' && (
51
+ <div className="h-full flex items-center justify-center text-white/40">
52
+ <p>Coming Soon: {activeView.charAt(0).toUpperCase() + activeView.slice(1)}</p>
53
+ </div>
54
+ )}
55
+ </motion.div>
56
+ </AnimatePresence>
57
+
58
+ {/* Mobile Navigation (Only on mobile) */}
59
+ {isMobile && <MobileNav activeView={activeView} onViewChange={setActiveView} />}
60
+ </div>
61
+ </>
62
+ );
63
+ }