docker setup

This commit is contained in:
2025-12-26 18:59:50 +01:00
parent 64377de548
commit 904feb41b8
11 changed files with 198 additions and 30 deletions

View File

@@ -378,13 +378,10 @@ export default function LeaguesPage() {
const [activeCategory, setActiveCategory] = useState<CategoryId>('all');
const [showFilters, setShowFilters] = useState(false);
useEffect(() => {
void loadLeagues();
}, []);
const { leagueService } = useServices();
const loadLeagues = async () => {
const loadLeagues = useCallback(async () => {
try {
const { leagueService } = useServices();
const leagues = await leagueService.getAllLeagues();
setRealLeagues(leagues);
} catch (error) {
@@ -392,7 +389,11 @@ export default function LeaguesPage() {
} finally {
setLoading(false);
}
};
}, [leagueService]);
useEffect(() => {
void loadLeagues();
}, [loadLeagues]);
const leagues = realLeagues;

View File

@@ -14,13 +14,11 @@ import SimPlatformMockup from '@/components/mockups/SimPlatformMockup';
import MockupStack from '@/components/ui/MockupStack';
import Card from '@/components/ui/Card';
import Button from '@/components/ui/Button';
import { getWebsiteApiBaseUrl } from '@/lib/config/apiBaseUrl';
import { ServiceFactory } from '@/lib/services/ServiceFactory';
export default async function HomePage() {
const baseUrl =
process.env.API_BASE_URL ??
process.env.NEXT_PUBLIC_API_BASE_URL ??
'http://api:3000';
const baseUrl = getWebsiteApiBaseUrl();
const serviceFactory = new ServiceFactory(baseUrl);
const sessionService = serviceFactory.createSessionService();
const landingService = serviceFactory.createLandingService();