mirror of
https://github.com/neynarxyz/create-farcaster-mini-app.git
synced 2025-11-18 17:09:47 -05:00
refactor: restructure for better ai comprehension
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import type { Tab } from "~/components/Demo";
|
||||
import { Tab } from "~/components/App";
|
||||
|
||||
interface FooterProps {
|
||||
activeTab: Tab;
|
||||
@@ -8,30 +8,30 @@ interface FooterProps {
|
||||
}
|
||||
|
||||
export const Footer: React.FC<FooterProps> = ({ activeTab, setActiveTab, showWallet = false }) => (
|
||||
<div className="fixed bottom-0 left-0 right-0 mx-4 mb-4 bg-gray-100 dark:bg-gray-800 border-[3px] border-double border-purple-500 px-2 py-2 rounded-lg z-50">
|
||||
<div className="fixed bottom-0 left-0 right-0 mx-4 mb-4 bg-gray-100 dark:bg-gray-800 border-[3px] border-double border-primary px-2 py-2 rounded-lg z-50">
|
||||
<div className="flex justify-around items-center h-14">
|
||||
<button
|
||||
onClick={() => setActiveTab('home')}
|
||||
onClick={() => setActiveTab(Tab.Home)}
|
||||
className={`flex flex-col items-center justify-center w-full h-full ${
|
||||
activeTab === 'home' ? 'text-purple-500 dark:text-purple-400' : 'text-gray-500 dark:text-gray-400'
|
||||
activeTab === Tab.Home ? 'text-primary dark:text-primary-light' : 'text-gray-500 dark:text-gray-400'
|
||||
}`}
|
||||
>
|
||||
<span className="text-xl">🏠</span>
|
||||
<span className="text-xs mt-1">Home</span>
|
||||
</button>
|
||||
<button
|
||||
onClick={() => setActiveTab('actions')}
|
||||
onClick={() => setActiveTab(Tab.Actions)}
|
||||
className={`flex flex-col items-center justify-center w-full h-full ${
|
||||
activeTab === 'actions' ? 'text-purple-500 dark:text-purple-400' : 'text-gray-500 dark:text-gray-400'
|
||||
activeTab === Tab.Actions ? 'text-primary dark:text-primary-light' : 'text-gray-500 dark:text-gray-400'
|
||||
}`}
|
||||
>
|
||||
<span className="text-xl">⚡</span>
|
||||
<span className="text-xs mt-1">Actions</span>
|
||||
</button>
|
||||
<button
|
||||
onClick={() => setActiveTab('context')}
|
||||
onClick={() => setActiveTab(Tab.Context)}
|
||||
className={`flex flex-col items-center justify-center w-full h-full ${
|
||||
activeTab === 'context' ? 'text-purple-500 dark:text-purple-400' : 'text-gray-500 dark:text-gray-400'
|
||||
activeTab === Tab.Context ? 'text-primary dark:text-primary-light' : 'text-gray-500 dark:text-gray-400'
|
||||
}`}
|
||||
>
|
||||
<span className="text-xl">📋</span>
|
||||
@@ -39,9 +39,9 @@ export const Footer: React.FC<FooterProps> = ({ activeTab, setActiveTab, showWal
|
||||
</button>
|
||||
{showWallet && (
|
||||
<button
|
||||
onClick={() => setActiveTab('wallet')}
|
||||
onClick={() => setActiveTab(Tab.Wallet)}
|
||||
className={`flex flex-col items-center justify-center w-full h-full ${
|
||||
activeTab === 'wallet' ? 'text-purple-500 dark:text-purple-400' : 'text-gray-500 dark:text-gray-400'
|
||||
activeTab === Tab.Wallet ? 'text-primary dark:text-primary-light' : 'text-gray-500 dark:text-gray-400'
|
||||
}`}
|
||||
>
|
||||
<span className="text-xl">👛</span>
|
||||
|
||||
Reference in New Issue
Block a user