2747d8ea45
- AdminOrdersPanel: clean rewrite matching earth-tone theme - Add status tabs (All/Pending/Picked Up) with pill-style buttons - Add search bar for name, phone, order ID - Add stop multi-select dropdown with checkbox filter - Standard 7-column table with pagination - UpgradePlanModal: Apple HIG glass-style modal component - DashboardHeader: reusable header with upgrade modal integration - DashboardUpgradeButton: standalone upgrade button component - Update stripe-checkout to support annual billing period - Fix readability in tools/addons section (darker badges)
36 lines
933 B
TypeScript
36 lines
933 B
TypeScript
"use client";
|
|
|
|
import { useState, useCallback } from "react";
|
|
import UpgradePlanModal from "@/components/admin/UpgradePlanModal";
|
|
|
|
interface DashboardUpgradeButtonProps {
|
|
brandId: string | null;
|
|
currentTier: string;
|
|
}
|
|
|
|
export default function DashboardUpgradeButton({ brandId, currentTier }: DashboardUpgradeButtonProps) {
|
|
const [isOpen, setIsOpen] = useState(false);
|
|
|
|
const openModal = useCallback(() => setIsOpen(true), []);
|
|
const closeModal = useCallback(() => setIsOpen(false), []);
|
|
|
|
if (!brandId) return null;
|
|
|
|
return (
|
|
<>
|
|
<button
|
|
onClick={openModal}
|
|
className="rounded-full bg-emerald-600 hover:bg-emerald-500 px-5 py-2.5 text-sm font-semibold text-white transition-all shadow-sm"
|
|
>
|
|
Upgrade Plan
|
|
</button>
|
|
|
|
<UpgradePlanModal
|
|
isOpen={isOpen}
|
|
onClose={closeModal}
|
|
brandId={brandId}
|
|
currentTier={currentTier}
|
|
/>
|
|
</>
|
|
);
|
|
} |