AUXteam commited on
Commit
463943e
·
verified ·
1 Parent(s): b4bead1

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. App.tsx +3 -1
  2. components/Hero.tsx +2 -2
  3. components/SimulationPage.tsx +21 -5
App.tsx CHANGED
@@ -17,7 +17,7 @@ import ConversationPage from './components/ConversationPage';
17
  import ChatPage from './components/ChatPage';
18
 
19
  function App() {
20
- const [currentView, setCurrentView] = useState<'landing' | 'simulation' | 'conversation' | 'chat'>('landing');
21
  const [user, setUser] = useState<any>(null);
22
 
23
  useEffect(() => {
@@ -66,6 +66,8 @@ function App() {
66
  onBack={goBackToLanding}
67
  onOpenConversation={openConversation}
68
  onOpenChat={openChat}
 
 
69
  />
70
  );
71
  }
 
17
  import ChatPage from './components/ChatPage';
18
 
19
  function App() {
20
+ const [currentView, setCurrentView] = useState<'landing' | 'simulation' | 'conversation' | 'chat'>('simulation');
21
  const [user, setUser] = useState<any>(null);
22
 
23
  useEffect(() => {
 
66
  onBack={goBackToLanding}
67
  onOpenConversation={openConversation}
68
  onOpenChat={openChat}
69
+ user={user}
70
+ onLogin={loginWithHF}
71
  />
72
  );
73
  }
components/Hero.tsx CHANGED
@@ -35,8 +35,8 @@ const Hero: React.FC<HeroProps> = ({ onStart }) => {
35
  Programmatically test your brand narratives. Integrate accurate audience simulation into your creative workflow. Free for developers.
36
  </p>
37
  <div className="flex flex-wrap gap-4 mt-8">
38
- <Button variant="primary" size="lg" onClick={onStart}>HF Space Demo</Button>
39
- <Button variant="outline" size="lg" onClick={() => window.location.href='#docs'}>Read the Docs</Button>
40
  </div>
41
  </div>
42
 
 
35
  Programmatically test your brand narratives. Integrate accurate audience simulation into your creative workflow. Free for developers.
36
  </p>
37
  <div className="flex flex-wrap gap-4 mt-8">
38
+ <Button variant="primary" size="lg" onClick={onStart}>Try Branding Simulation</Button>
39
+ <Button variant="outline" size="lg" onClick={() => window.location.href='#features'}>How it Works</Button>
40
  </div>
41
  </div>
42
 
components/SimulationPage.tsx CHANGED
@@ -6,6 +6,8 @@ interface SimulationPageProps {
6
  onBack: () => void;
7
  onOpenConversation: () => void;
8
  onOpenChat: () => void;
 
 
9
  }
10
 
11
  // Define the data structure for filters
@@ -38,7 +40,7 @@ const VIEW_FILTERS: Record<string, Array<{ label: string; color: string }>> = {
38
  ]
39
  };
40
 
41
- const SimulationPage: React.FC<SimulationPageProps> = ({ onBack, onOpenConversation, onOpenChat }) => {
42
  const [society, setSociety] = useState('User Group 1');
43
  const [viewMode, setViewMode] = useState('Job Title');
44
  const [isBuilding, setIsBuilding] = useState(false);
@@ -173,10 +175,24 @@ const SimulationPage: React.FC<SimulationPageProps> = ({ onBack, onOpenConversat
173
 
174
  {/* Footer */}
175
  <div className="border-t border-gray-800 p-4 space-y-1 bg-[#0a0a0a]">
176
- <div className="flex justify-between items-center py-2 text-sm text-gray-400 border-b border-gray-800 mb-2 pb-4">
177
- <span>Credits: 0</span>
178
- <Info size={14} className="cursor-help" />
179
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
180
 
181
  <MenuItem icon={<Plus size={16}/>} label="Start Free Trial" highlight />
182
  <MenuItem icon={<MessageSquare size={16}/>} label="Leave Feedback" />
 
6
  onBack: () => void;
7
  onOpenConversation: () => void;
8
  onOpenChat: () => void;
9
+ user?: any;
10
+ onLogin?: () => void;
11
  }
12
 
13
  // Define the data structure for filters
 
40
  ]
41
  };
42
 
43
+ const SimulationPage: React.FC<SimulationPageProps> = ({ onBack, onOpenConversation, onOpenChat, user, onLogin }) => {
44
  const [society, setSociety] = useState('User Group 1');
45
  const [viewMode, setViewMode] = useState('Job Title');
46
  const [isBuilding, setIsBuilding] = useState(false);
 
175
 
176
  {/* Footer */}
177
  <div className="border-t border-gray-800 p-4 space-y-1 bg-[#0a0a0a]">
178
+ {user ? (
179
+ <div className="flex items-center gap-3 py-3 border-b border-gray-800 mb-2">
180
+ {user.avatarUrl && <img src={user.avatarUrl} alt={user.preferred_username} className="w-8 h-8 rounded-full border border-gray-700" />}
181
+ <div className="flex flex-col">
182
+ <span className="text-xs font-semibold text-gray-200">{user.preferred_username}</span>
183
+ <span className="text-[10px] text-gray-500">Credits: 0</span>
184
+ </div>
185
+ </div>
186
+ ) : (
187
+ <div className="py-2 border-b border-gray-800 mb-2">
188
+ <button
189
+ onClick={onLogin}
190
+ className="w-full py-2 bg-white text-black rounded-lg text-xs font-bold hover:bg-gray-200 transition-colors"
191
+ >
192
+ Sign in with Hugging Face
193
+ </button>
194
+ </div>
195
+ )}
196
 
197
  <MenuItem icon={<Plus size={16}/>} label="Start Free Trial" highlight />
198
  <MenuItem icon={<MessageSquare size={16}/>} label="Leave Feedback" />