di usage in website

This commit is contained in:
2026-01-06 19:36:03 +01:00
parent 589b55a87e
commit e589c30bf8
191 changed files with 6367 additions and 4253 deletions

View File

@@ -7,22 +7,18 @@ import OnboardingWizard from '@/components/onboarding/OnboardingWizard';
import { useAuth } from '@/lib/auth/AuthContext';
// Shared state components
import { useDataFetching } from '@/components/shared/hooks/useDataFetching';
import { useCurrentDriver } from '@/hooks/driver/useCurrentDriver';
import { LoadingWrapper } from '@/components/shared/state/LoadingWrapper';
import { useServices } from '@/lib/services/ServiceProvider';
export default function OnboardingPage() {
const router = useRouter();
const { session } = useAuth();
const { driverService } = useServices();
// Check if user is logged in
const shouldRedirectToLogin = !session;
// Fetch current driver data
const { data: driver, isLoading } = useDataFetching({
queryKey: ['currentDriver'],
queryFn: () => driverService.getCurrentDriver(),
// Fetch current driver data using DI + React-Query
const { data: driver, isLoading } = useCurrentDriver({
enabled: !!session,
});
@@ -59,4 +55,4 @@ export default function OnboardingPage() {
<OnboardingWizard />
</main>
);
}
}