Sửa lỗi backend để chạy phần đăng ký

This commit is contained in:
2026-06-13 17:41:11 +07:00
parent c08aad3f68
commit 6913bbae48
70 changed files with 1296 additions and 210 deletions
+15 -5
View File
@@ -1,17 +1,27 @@
import React, { useState } from 'react';
import { LandingPage } from './LandingPage';
import { TourDetailPage } from './TourDetailPage';
import { ExploreMap } from './ExploreMap';
import { SignupPage } from './SignupPage';
import React, { useState, useEffect } from 'react';
import { LandingPage } from './LandingPage.js';
import { TourDetailPage } from './TourDetailPage.js';
import { ExploreMap } from './ExploreMap.js';
import { SignupPage } from './SignupPage.js';
const App = () => {
type View = 'landing' | 'explore' | 'detail' | 'signup';
const [view, setView] = useState<View>('landing');
const [isInitialSetup, setIsInitialSetup] = useState(false);
useEffect(() => {
// Kiểm tra xem hệ thống đã được cài đặt chưa
fetch('http://localhost:3001/api/v1/auth/status')
.then(res => res.json())
.then(data => setIsInitialSetup(data.isInitialSetup))
.catch(() => setIsInitialSetup(false));
}, [view]);
return (
<div className="app-container">
{view === 'landing' && (
<LandingPage
isInitialSetup={isInitialSetup}
onContinue={() => setView('explore')}
onGoToSignup={() => setView('signup')}
onGoToMap={() => setView('explore')}