|
| 1 | +'use client'; |
| 2 | + |
| 3 | +import Image from 'next/image'; |
| 4 | +import React, { useState } from 'react'; |
| 5 | + |
| 6 | +// Countdown started May 20 2026 — shuts down June 19 2026 |
| 7 | +const SHUTDOWN_DATE = new Date('2026-06-19T00:00:00.000Z'); |
| 8 | + |
| 9 | +const getDaysRemaining = () => { |
| 10 | + const diff = SHUTDOWN_DATE.getTime() - Date.now(); |
| 11 | + return Math.max(0, Math.ceil(diff / (1000 * 60 * 60 * 24))); |
| 12 | +}; |
| 13 | + |
| 14 | +const ShutdownBanner = () => { |
| 15 | + const [dismissed, setDismissed] = useState(false); |
| 16 | + const daysRemaining = getDaysRemaining(); |
| 17 | + |
| 18 | + if (dismissed || daysRemaining === 0) return null; |
| 19 | + |
| 20 | + return ( |
| 21 | + <div |
| 22 | + className="fixed top-0 left-0 right-0 z-[9999] border-b border-red-900/40" |
| 23 | + style={{ |
| 24 | + background: 'linear-gradient(90deg, #1a0505 0%, #220707 50%, #1a0505 100%)', |
| 25 | + boxShadow: '0 2px 24px rgba(185, 28, 28, 0.18)', |
| 26 | + }} |
| 27 | + role="alert" |
| 28 | + aria-live="polite" |
| 29 | + > |
| 30 | + <div className="w-full max-w-[1512px] mx-auto flex items-center justify-between px-6 h-11 gap-6"> |
| 31 | + |
| 32 | + <div className="flex items-center gap-3 flex-1 min-w-0"> |
| 33 | + <span className="relative flex h-2 w-2 shrink-0"> |
| 34 | + <span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-red-500 opacity-50" /> |
| 35 | + <span className="relative inline-flex h-2 w-2 rounded-full bg-red-500" /> |
| 36 | + </span> |
| 37 | + |
| 38 | + <p className="m-0 text-sm leading-none flex items-center gap-2.5 flex-wrap"> |
| 39 | + <span className="font-semibold text-red-300 tracking-wide"> |
| 40 | + Resolute is shutting down in{' '} |
| 41 | + <span className="text-red-200"> |
| 42 | + {daysRemaining} {daysRemaining === 1 ? 'day' : 'days'} |
| 43 | + </span> |
| 44 | + </span> |
| 45 | + |
| 46 | + <span className="text-[#ffffff18] select-none">|</span> |
| 47 | + |
| 48 | + <span className="text-[#ffffff60] font-light"> |
| 49 | + Still using it? Reach out — |
| 50 | + </span> |
| 51 | + |
| 52 | + <span className="flex items-center gap-3"> |
| 53 | + <a |
| 54 | + href="https://twitter.com/vitwit_" |
| 55 | + target="_blank" |
| 56 | + rel="noopener noreferrer" |
| 57 | + title="Reach us on X (Twitter)" |
| 58 | + className="opacity-60 hover:opacity-100 transition-opacity duration-150" |
| 59 | + > |
| 60 | + <Image src="/twitter-icon.png" width={15} height={15} alt="X (Twitter)" /> |
| 61 | + </a> |
| 62 | + <a |
| 63 | + href="https://t.me/+3bXmS6GE4HRjYmU1" |
| 64 | + target="_blank" |
| 65 | + rel="noopener noreferrer" |
| 66 | + title="Reach us on Telegram" |
| 67 | + className="opacity-60 hover:opacity-100 transition-opacity duration-150" |
| 68 | + > |
| 69 | + <Image src="/telegram-icon.png" width={15} height={15} alt="Telegram" /> |
| 70 | + </a> |
| 71 | + </span> |
| 72 | + </p> |
| 73 | + </div> |
| 74 | + |
| 75 | + <button |
| 76 | + onClick={() => setDismissed(true)} |
| 77 | + aria-label="Dismiss" |
| 78 | + className="shrink-0 flex items-center justify-center w-6 h-6 rounded-full border border-red-800/60 text-red-400/70 hover:border-red-600 hover:text-red-300 hover:bg-red-900/30 transition-all duration-150 cursor-pointer" |
| 79 | + > |
| 80 | + <svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round"> |
| 81 | + <line x1="18" y1="6" x2="6" y2="18" /> |
| 82 | + <line x1="6" y1="6" x2="18" y2="18" /> |
| 83 | + </svg> |
| 84 | + </button> |
| 85 | + |
| 86 | + </div> |
| 87 | + </div> |
| 88 | + ); |
| 89 | +}; |
| 90 | + |
| 91 | +export default ShutdownBanner; |
0 commit comments