diff --git a/bin/init.js b/bin/init.js index 91b2fb4..c0ffd39 100644 --- a/bin/init.js +++ b/bin/init.js @@ -771,6 +771,21 @@ export async function init(projectName = null, autoAcceptDefaults = false, apiKe if (fs.existsSync(authFilePath)) { fs.rmSync(authFilePath, { force: true }); } + + // Replace NeynarAuthButton import in ActionsTab.tsx with null component + const actionsTabPath = path.join(projectPath, 'src', 'components', 'ui', 'tabs', 'ActionsTab.tsx'); + if (fs.existsSync(actionsTabPath)) { + let actionsTabContent = fs.readFileSync(actionsTabPath, 'utf8'); + + // Replace the dynamic import of NeynarAuthButton with a null component + actionsTabContent = actionsTabContent.replace( + /const NeynarAuthButton = dynamic\([\s\S]*?\);/, + '// NeynarAuthButton disabled - SIWN not enabled\nconst NeynarAuthButton = () => {\n return null;\n};' + ); + + fs.writeFileSync(actionsTabPath, actionsTabContent); + console.log('✅ Replaced NeynarAuthButton import in ActionsTab.tsx with null component'); + } } // Initialize git repository diff --git a/package.json b/package.json index 932a683..071b900 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@neynar/create-farcaster-mini-app", - "version": "1.7.12", + "version": "1.7.13", "type": "module", "private": false, "access": "public",