mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 02:31:12 -05:00
Fix TypeScript strict mode errors
This commit is contained in:
@@ -411,7 +411,7 @@ export default function Profile() {
|
||||
|
||||
if (data) {
|
||||
// Fetch location separately if location_id is visible
|
||||
let locationData = null;
|
||||
let locationData: any = null;
|
||||
if (data.location_id) {
|
||||
const { data: location } = await supabase
|
||||
.from('locations')
|
||||
@@ -426,7 +426,7 @@ export default function Profile() {
|
||||
location: locationData
|
||||
};
|
||||
|
||||
setProfile(profileWithLocation as ProfileType);
|
||||
setProfile(profileWithLocation as unknown as ProfileType);
|
||||
setEditForm({
|
||||
username: data.username || '',
|
||||
display_name: data.display_name || '',
|
||||
@@ -436,8 +436,8 @@ export default function Profile() {
|
||||
setAvatarImageId(data.avatar_image_id || '');
|
||||
|
||||
// Fetch calculated stats and recent activity for this user
|
||||
await fetchCalculatedStats(data.user_id);
|
||||
await fetchRecentActivity(data.user_id);
|
||||
await fetchCalculatedStats(data.user_id || '');
|
||||
await fetchRecentActivity(data.user_id || '');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error fetching profile:', error);
|
||||
@@ -772,7 +772,10 @@ export default function Profile() {
|
||||
|
||||
{/* Show location (privacy already enforced by get_filtered_profile) */}
|
||||
<LocationDisplay
|
||||
location={profile.location}
|
||||
location={profile.location ? {
|
||||
...profile.location,
|
||||
city: profile.location.city ?? undefined
|
||||
} : undefined}
|
||||
/>
|
||||
</div>
|
||||
</div>}
|
||||
|
||||
Reference in New Issue
Block a user