mirror of
https://github.com/neynarxyz/create-farcaster-mini-app.git
synced 2025-11-15 23:58:56 -05:00
fix: remove NeynarAuthButton import conditionally
This commit is contained in:
parent
d1ec161f47
commit
7dff4cd81a
15
bin/init.js
15
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
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@neynar/create-farcaster-mini-app",
|
||||
"version": "1.7.12",
|
||||
"version": "1.7.13",
|
||||
"type": "module",
|
||||
"private": false,
|
||||
"access": "public",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user