mirror of
https://github.com/neynarxyz/create-farcaster-mini-app.git
synced 2025-12-06 17:32:31 -05:00
remove console logs
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { useState } from 'react';
|
||||
import Image from 'next/image';
|
||||
import sdk from '@farcaster/miniapp-sdk';
|
||||
import { useMiniApp } from '@neynar/react';
|
||||
import { APP_NAME } from '~/lib/constants';
|
||||
@@ -28,7 +29,7 @@ export function Header({ neynarUser }: HeaderProps) {
|
||||
}}
|
||||
>
|
||||
{context.user.pfpUrl && (
|
||||
<img
|
||||
<Image
|
||||
src={context.user.pfpUrl}
|
||||
alt="Profile"
|
||||
className="w-10 h-10 rounded-full border-2 border-primary"
|
||||
|
||||
@@ -565,7 +565,7 @@ export function NeynarAuthButton() {
|
||||
}
|
||||
} catch (e) {
|
||||
if (e instanceof SignInCore.RejectedByUser) {
|
||||
console.log('ℹ️ Sign-in rejected by user');
|
||||
console.error('ℹ️ Sign-in rejected by user');
|
||||
} else {
|
||||
console.error('❌ Backend sign-in error:', e);
|
||||
}
|
||||
|
||||
@@ -109,11 +109,6 @@ function ConnectionControls({
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => {
|
||||
console.log('Manual Farcaster connection attempt');
|
||||
console.log(
|
||||
'Connectors:',
|
||||
connectors.map((c, i) => `${i}: ${c.name}`),
|
||||
);
|
||||
connect({ connector: connectors[0] });
|
||||
}}
|
||||
className="w-full"
|
||||
@@ -209,27 +204,12 @@ export function WalletTab() {
|
||||
connectors.length > 0 &&
|
||||
isInFarcasterClient
|
||||
) {
|
||||
console.log('Attempting auto-connection with Farcaster context...');
|
||||
console.log('- User FID:', context.user.fid);
|
||||
console.log(
|
||||
'- Available connectors:',
|
||||
connectors.map((c, i) => `${i}: ${c.name}`),
|
||||
);
|
||||
console.log('- Using connector:', connectors[0].name);
|
||||
console.log('- In Farcaster client:', isInFarcasterClient);
|
||||
|
||||
// Use the first connector (farcasterFrame) for auto-connection
|
||||
try {
|
||||
connect({ connector: connectors[0] });
|
||||
} catch (error) {
|
||||
console.error('Auto-connection failed:', error);
|
||||
}
|
||||
} else {
|
||||
console.log('Auto-connection conditions not met:');
|
||||
console.log('- Has context:', !!context?.user?.fid);
|
||||
console.log('- Is connected:', isConnected);
|
||||
console.log('- Has connectors:', connectors.length > 0);
|
||||
console.log('- In Farcaster client:', isInFarcasterClient);
|
||||
}
|
||||
}, [context?.user?.fid, isConnected, connectors, connect, context?.client]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user