diff --git a/src/App.jsx b/src/App.jsx
index 9c3be94..cbca8d8 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -1,6 +1,7 @@
import { useState } from 'react'
-import InputForm from './components/InputForm'
-import ResponseCard from './components/ResponseCard'
+import LandingPage from './pages/LandingPage'
+import BuyerPage from './pages/BuyerPage'
+import SellerPage from './pages/SellerPage'
import { generateMessages } from './utils/messageGenerator'
function App() {
@@ -36,224 +37,25 @@ function App() {
window.scrollTo({ top: 0, behavior: 'smooth' })
}
- // Landing Page - User Type Selection
if (!userType) {
- return (
-
-
- {/* Logo */}
-
-
💬 Haggly
-
Your AI-powered negotiation assistant
-
-
- {/* Question */}
-
Are you buying or selling?
-
- {/* Buttons */}
-
-
-
-
-
-
- {/* Subtitle */}
-
- Get personalized scripts and strategies for any negotiation
-
-
-
- )
+ return
}
- // Buyer Page - Coming Soon
if (userType === 'buyer') {
- return (
-
- {/* Header */}
-
-
- {/* Coming Soon Content */}
-
-
-
-
🚧
-
Coming Very Soon!
-
- We're building amazing buyer tools including:
-
-
- -
- ✓
- Strategic questioning techniques
-
- -
- ✓
- Negotiation scripts for different scenarios
-
- -
- ✓
- "Guard down" moment detection
-
- -
- ✓
- Car buying specific strategies
-
-
-
- For now, try our seller tools or check back soon!
-
-
-
-
-
- )
+ return setUserType(null)} />
}
- // Seller Page - Current Functionality
return (
-
- {/* Toast Notification */}
- {toast && (
-
- )}
-
- {/* Header */}
-
-
- {/* Main Content */}
-
-
- {/* Input Form */}
-
-
-
-
- {/* Results */}
- {responses && (
-
-
-
- Your Responses
-
-
-
-
-
- Pick the tone that fits your style. Tap to copy!
-
-
- {responses.map((response, index) => (
-
showToast('Copied to clipboard!')}
- delay={index * 100}
- />
- ))}
-
- {/* Tips Section */}
-
-
- 💡 Quick Tips
-
-
- - • Be polite but firm — you set the price for a reason
- - • It's okay to say no — good buyers respect fair prices
- - • Don't take lowballs personally, just part of the game
-
-
-
- )}
-
- {/* Empty State */}
- {!responses && (
-
-
💬
-
Fill in the details above to generate responses
-
- )}
-
-
-
- {/* Footer */}
-
-
+ setUserType(null)}
+ onGenerate={handleGenerate}
+ onReset={handleReset}
+ onCopy={showToast}
+ />
)
}
-export default App
\ No newline at end of file
+export default App
diff --git a/src/components/Toast.jsx b/src/components/Toast.jsx
new file mode 100644
index 0000000..438964d
--- /dev/null
+++ b/src/components/Toast.jsx
@@ -0,0 +1,18 @@
+function Toast({ message }) {
+ if (!message) {
+ return null
+ }
+
+ return (
+
+ )
+}
+
+export default Toast
diff --git a/src/pages/BuyerPage.jsx b/src/pages/BuyerPage.jsx
new file mode 100644
index 0000000..ba3a7d2
--- /dev/null
+++ b/src/pages/BuyerPage.jsx
@@ -0,0 +1,60 @@
+function BuyerPage({ onBack }) {
+ return (
+
+
+
+
+
+
+
🚧
+
Coming Very Soon!
+
+ We're building amazing buyer tools including:
+
+
+ -
+ ✓
+ Strategic questioning techniques
+
+ -
+ ✓
+ Negotiation scripts for different scenarios
+
+ -
+ ✓
+ "Guard down" moment detection
+
+ -
+ ✓
+ Car buying specific strategies
+
+
+
+ For now, try our seller tools or check back soon!
+
+
+
+
+
+ )
+}
+
+export default BuyerPage
diff --git a/src/pages/LandingPage.jsx b/src/pages/LandingPage.jsx
new file mode 100644
index 0000000..d5f1932
--- /dev/null
+++ b/src/pages/LandingPage.jsx
@@ -0,0 +1,38 @@
+function LandingPage({ onSelectUserType }) {
+ return (
+
+
+
+
💬 Haggly
+
Your AI-powered negotiation assistant
+
+
+
Are you buying or selling?
+
+
+
+
+
+
+
+
+ Get personalized scripts and strategies for any negotiation
+
+
+
+ )
+}
+
+export default LandingPage
diff --git a/src/pages/SellerPage.jsx b/src/pages/SellerPage.jsx
new file mode 100644
index 0000000..6748b17
--- /dev/null
+++ b/src/pages/SellerPage.jsx
@@ -0,0 +1,103 @@
+import InputForm from '../components/InputForm'
+import ResponseCard from '../components/ResponseCard'
+import Toast from '../components/Toast'
+
+function SellerPage({ responses, toast, isGenerating, onBack, onGenerate, onReset, onCopy }) {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+ {responses && (
+
+
+
+ Your Responses
+
+
+
+
+
+ Pick the tone that fits your style. Tap to copy!
+
+
+ {responses.map((response, index) => (
+
onCopy('Copied to clipboard!')}
+ delay={index * 100}
+ />
+ ))}
+
+
+
+ 💡 Quick Tips
+
+
+ - • Be polite but firm — you set the price for a reason
+ - • It's okay to say no — good buyers respect fair prices
+ - • Don't take lowballs personally, just part of the game
+
+
+
+ )}
+
+ {!responses && (
+
+
💬
+
Fill in the details above to generate responses
+
+ )}
+
+
+
+
+
+ )
+}
+
+export default SellerPage