All files / src/components/features/demo DemoModeBanner.tsx

47.61% Statements 10/21
100% Branches 0/0
0% Functions 0/1
47.61% Lines 10/21

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 221x 1x 1x 1x 1x 1x 1x 1x                       1x 1x  
"use client";
 
import { getClientDemoMode } from "@/lib/demo-mode";
 
/**
 * Banner displayed when demo mode is active
 * Shows a prominent notice that orders won't process real payments
 */
export function DemoModeBanner() {
  const isDemo = getClientDemoMode();

  if (!isDemo) return null;

  return (
    <div className="bg-yellow-500 dark:bg-yellow-600 text-black dark:text-white text-center py-2 px-4 text-sm font-medium">
      Demo Mode Active - Orders will not process real payments
    </div>
  );
}
 
export default DemoModeBanner;