add website tests
This commit is contained in:
@@ -269,10 +269,14 @@ export default function ProfilePage() {
|
||||
const isOwnProfile = true; // This page is always your own profile
|
||||
|
||||
useEffect(() => {
|
||||
if (!effectiveDriverId) {
|
||||
return;
|
||||
}
|
||||
|
||||
const loadData = async () => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const currentDriverId = effectiveDriverId;
|
||||
const profileViewModel = await driverService.getDriverProfile(currentDriverId);
|
||||
const profileViewModel = await driverService.getDriverProfile(effectiveDriverId);
|
||||
setProfileData(profileViewModel);
|
||||
} catch (error) {
|
||||
console.error('Failed to load profile:', error);
|
||||
@@ -280,6 +284,7 @@ export default function ProfilePage() {
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
void loadData();
|
||||
}, [effectiveDriverId, driverService]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user