Implement Option A (Live Job API), Option B (RSS Feed Aggregator), and Option C (Web Scraper Import API)
This commit is contained in:
+10
-1
@@ -57,7 +57,7 @@ export default function App() {
|
||||
const [isNewAppModalOpen, setIsNewAppModalOpen] = useState(false);
|
||||
const [walkthroughInitialUrl, setWalkthroughInitialUrl] = useState('');
|
||||
|
||||
// Initial Load from Firestore
|
||||
// Initial Load from Firestore & Live Job Feeds
|
||||
useEffect(() => {
|
||||
async function loadData() {
|
||||
try {
|
||||
@@ -72,6 +72,15 @@ export default function App() {
|
||||
|
||||
const notifs = await fetchNotifications();
|
||||
if (notifs.length > 0) setNotifications(notifs);
|
||||
|
||||
// Fetch live job feeds from APIs + RSS
|
||||
const feedsRes = await fetch('/api/jobs/fetch-feeds');
|
||||
if (feedsRes.ok) {
|
||||
const feedsData = await feedsRes.json();
|
||||
if (feedsData.success && Array.isArray(feedsData.jobs) && feedsData.jobs.length > 0) {
|
||||
setJobFeeds(prev => [...feedsData.jobs, ...prev]);
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.warn('Initial load fallback to initial dataset:', err);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user