Remove ArmSwitcherModal and replace with /arms navigation

cgen-8dc4e4e224d74afa811ca29f4b1ad677
This commit is contained in:
Builder.io 2025-11-10 21:11:02 +00:00
parent be071180b4
commit 66ad8da493

View file

@ -1,5 +1,4 @@
import { useState } from "react";
import ArmSwitcherModal from "./ArmSwitcherModal";
import { Link, useLocation, useNavigate } from "react-router-dom";
import { Button } from "@/components/ui/button";
import { cn } from "@/lib/utils";
@ -72,7 +71,6 @@ export default function CodeLayout({ children, hideFooter }: LayoutProps) {
const location = useLocation();
const navigate = useNavigate();
const { user, profile, signOut, loading, profileComplete } = useAuth();
const [isArmModalOpen, setIsArmModalOpen] = useState(false);
const navigation = [
{ name: "Home", href: "/" },
@ -151,36 +149,20 @@ export default function CodeLayout({ children, hideFooter }: LayoutProps) {
{/* Mobile - Spinning Logo Button */}
<button
type="button"
onClick={() => setIsArmModalOpen(true)}
className={`sm:hidden relative h-12 w-12 flex items-center justify-center rounded-xl transition-all duration-300 cursor-pointer focus:outline-none focus:ring-2 focus:ring-aethex-400 ${
isArmModalOpen
? "bg-gradient-to-r from-yellow-500/40 via-green-500/40 to-blue-500/40 scale-110 shadow-lg shadow-purple-500/50 border-2 border-purple-400/80"
: "bg-gradient-to-br from-aethex-600 to-purple-700 hover:from-aethex-500 hover:to-purple-600 shadow-lg shadow-aethex-500/30 border-2 border-aethex-400/40"
}`}
onClick={() => navigate("/arms")}
className="sm:hidden relative h-12 w-12 flex items-center justify-center rounded-xl bg-gradient-to-br from-aethex-600 to-purple-700 hover:from-aethex-500 hover:to-purple-600 shadow-lg shadow-aethex-500/30 border-2 border-aethex-400/40 transition-all duration-300 cursor-pointer focus:outline-none focus:ring-2 focus:ring-aethex-400 hover:scale-110"
title="Select Arm"
>
{!isArmModalOpen && (
<div
className="absolute inset-0 rounded-xl border-2 border-aethex-400/60 opacity-60 group-hover:opacity-100"
style={{
animation: "pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
}}
/>
)}
{isArmModalOpen && (
<div
className="absolute inset-0 rounded-xl border-2 border-purple-400/80 animate-spin"
style={{
animation: "spin 3s linear infinite",
}}
/>
)}
<div
className="absolute inset-0 rounded-xl border-2 border-aethex-400/60 opacity-60 group-hover:opacity-100"
style={{
animation: "pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
}}
/>
<img
src="https://docs.aethex.tech/~gitbook/image?url=https%3A%2F%2F1143808467-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Forganizations%252FDhUg3jal6kdpG645FzIl%252Fsites%252Fsite_HeOmR%252Flogo%252FqxDYz8Oj2SnwUTa8t3UB%252FAeThex%2520Origin%2520logo.png%3Falt%3Dmedia%26token%3D200e8ea2-0129-4cbe-b516-4a53f60c512b&width=256&dpr=1&quality=100&sign=6c7576ce&sv=2"
alt="AeThex Logo"
className={`relative h-8 w-8 transition-all duration-300 z-10 ${
isArmModalOpen ? "rotate-180 scale-75" : "rotate-0"
}`}
className="relative h-8 w-8 transition-all duration-300 z-10"
/>
</button>
</div>
@ -672,11 +654,6 @@ export default function CodeLayout({ children, hideFooter }: LayoutProps) {
{/* Supabase Configuration Status */}
<SupabaseStatus />
{/* Arm Selector Modal - Rendered at root level */}
<ArmSwitcherModal
isOpen={isArmModalOpen}
onClose={() => setIsArmModalOpen(false)}
/>
<style>{`
@keyframes spin {