import React, { useState } from 'react'; import { LandingPage } from './LandingPage'; import { TourDetailPage } from './TourDetailPage'; import { ExploreMap } from './ExploreMap'; import { SignupPage } from './SignupPage'; const App = () => { type View = 'landing' | 'explore' | 'detail' | 'signup'; const [view, setView] = useState('landing'); return (
{view === 'landing' && ( setView('explore')} onGoToSignup={() => setView('signup')} /> )} {view === 'signup' && ( setView('landing')} onSuccess={() => setView('landing')} /> )} {view === 'explore' && ( setView('landing')} /> )} {view === 'detail' && ( )}
); }; export default App;