mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-06-23 21:01:06 +00:00
chore: Remove debug logging from profile operations
Cleaned up console.log statements added during debugging: - Removed verbose logging from ProfileSettings loadProfile - Removed verbose logging from ProfileSettings updateProfile - Removed verbose logging from Dashboard fetchProfile Kept only essential error logging for production. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -32,8 +32,6 @@ export default function Dashboard() {
|
||||
const fetchProfile = async () => {
|
||||
if (!user) return;
|
||||
|
||||
console.log('📥 FETCHING PROFILE for user:', user.id);
|
||||
|
||||
try {
|
||||
const { data, error } = await supabase
|
||||
.from('profiles')
|
||||
@@ -41,9 +39,6 @@ export default function Dashboard() {
|
||||
.eq('id', user.id)
|
||||
.single();
|
||||
|
||||
console.log('📊 FETCHED PROFILE DATA:', data);
|
||||
console.log('❌ Fetch error:', error);
|
||||
|
||||
if (error) throw error;
|
||||
|
||||
// Auto-sync user metadata from Auth to profiles if missing
|
||||
@@ -67,7 +62,6 @@ export default function Dashboard() {
|
||||
|
||||
// If there are fields to update, update the profile
|
||||
if (Object.keys(needsUpdate).length > 0) {
|
||||
console.log('🔄 Syncing profile from Auth metadata:', needsUpdate);
|
||||
const { error: updateError } = await supabase
|
||||
.from('profiles')
|
||||
.update(needsUpdate)
|
||||
@@ -83,10 +77,9 @@ export default function Dashboard() {
|
||||
// Note: Email verification is handled by Supabase Auth (user.email_confirmed_at)
|
||||
// We don't store it in profiles table to avoid duplication
|
||||
|
||||
console.log('✅ SETTING PROFILE STATE TO:', data);
|
||||
setProfile(data);
|
||||
} catch (error) {
|
||||
console.error('❌ Error fetching profile:', error);
|
||||
console.error('Error fetching profile:', error);
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user