feat: reapply quickauth changes conditionally

This commit is contained in:
veganbeef
2025-07-16 09:16:58 -07:00
parent 8eabbd3ba1
commit e61bc88aaa
8 changed files with 588 additions and 202 deletions

View File

@@ -1,13 +1,23 @@
'use client';
import { useCallback, useState } from 'react';
import { useCallback, useState, type ComponentType } from 'react';
import { useMiniApp } from '@neynar/react';
import { ShareButton } from '../Share';
import { Button } from '../Button';
import { SignIn } from '../wallet/SignIn';
import { type Haptics } from '@farcaster/miniapp-sdk';
import { APP_URL } from '~/lib/constants';
import { NeynarAuthButton } from '../NeynarAuthButton/index';
// Optional import for NeynarAuthButton - may not exist in all templates
let NeynarAuthButton: ComponentType | null = null;
try {
const module = require('../NeynarAuthButton/index');
NeynarAuthButton = module.NeynarAuthButton;
} catch (error) {
// Component doesn't exist, that's okay
console.log('NeynarAuthButton not available in this template');
}
/**
* ActionsTab component handles mini app actions like sharing, notifications, and haptic feedback.
@@ -140,7 +150,7 @@ export function ActionsTab() {
<SignIn />
{/* Neynar Authentication */}
<NeynarAuthButton />
{NeynarAuthButton && <NeynarAuthButton />}
{/* Mini app actions */}
<Button