docker setup
This commit is contained in:
@@ -12,6 +12,7 @@ import { DashboardApiClient } from '../api/dashboard/DashboardApiClient';
|
||||
import { PolicyApiClient } from '../api/policy/PolicyApiClient';
|
||||
import { ProtestsApiClient } from '../api/protests/ProtestsApiClient';
|
||||
import { PenaltiesApiClient } from '../api/penalties/PenaltiesApiClient';
|
||||
import { getWebsiteApiBaseUrl } from '../config/apiBaseUrl';
|
||||
import { PenaltyService } from './penalties/PenaltyService';
|
||||
import { ConsoleErrorReporter } from '../infrastructure/logging/ConsoleErrorReporter';
|
||||
import { ConsoleLogger } from '../infrastructure/logging/ConsoleLogger';
|
||||
@@ -102,7 +103,7 @@ export class ServiceFactory {
|
||||
|
||||
private static getDefaultInstance(): ServiceFactory {
|
||||
if (!this.defaultInstance) {
|
||||
this.defaultInstance = new ServiceFactory(process.env.NEXT_PUBLIC_API_BASE_URL || 'http://localhost:3001');
|
||||
this.defaultInstance = new ServiceFactory(getWebsiteApiBaseUrl());
|
||||
}
|
||||
return this.defaultInstance;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
||||
import { createContext, ReactNode, useContext, useMemo } from 'react';
|
||||
import { getWebsiteApiBaseUrl } from '../config/apiBaseUrl';
|
||||
import { ServiceFactory } from './ServiceFactory';
|
||||
|
||||
// Import all service types
|
||||
@@ -82,7 +83,7 @@ interface ServiceProviderProps {
|
||||
|
||||
export function ServiceProvider({ children }: ServiceProviderProps) {
|
||||
const services = useMemo(() => {
|
||||
const serviceFactory = new ServiceFactory(process.env.NEXT_PUBLIC_API_BASE_URL || 'http://localhost:3001');
|
||||
const serviceFactory = new ServiceFactory(getWebsiteApiBaseUrl());
|
||||
|
||||
return {
|
||||
raceService: serviceFactory.createRaceService(),
|
||||
|
||||
Reference in New Issue
Block a user