fix: remove NeynarAuthButton import conditionally

This commit is contained in:
veganbeef 2025-07-18 18:57:14 -07:00
parent d1ec161f47
commit 7dff4cd81a
No known key found for this signature in database
2 changed files with 16 additions and 1 deletions

View File

@ -771,6 +771,21 @@ export async function init(projectName = null, autoAcceptDefaults = false, apiKe
if (fs.existsSync(authFilePath)) { if (fs.existsSync(authFilePath)) {
fs.rmSync(authFilePath, { force: true }); 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 // Initialize git repository

View File

@ -1,6 +1,6 @@
{ {
"name": "@neynar/create-farcaster-mini-app", "name": "@neynar/create-farcaster-mini-app",
"version": "1.7.12", "version": "1.7.13",
"type": "module", "type": "module",
"private": false, "private": false,
"access": "public", "access": "public",