docker setup
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user