|
3 | 3 | import { useState, useEffect, useMemo, useRef, type ReactNode } from "react"; |
4 | 4 | import Link from "next/link"; |
5 | 5 | import type { Playbook, Platform, Device, DeviceCategory } from "@/types/playbook"; |
6 | | -import { formatTime, platformNames, extractPlatforms, DEVICE_CATEGORY_MAP, deviceNames, COMING_SOON_CATEGORIES, COMING_SOON_DEVICES } from "@/types/playbook"; |
| 6 | +import { formatTime, platformNames, extractPlatforms, DEVICE_CATEGORY_MAP, deviceNames } from "@/types/playbook"; |
7 | 7 |
|
8 | 8 | function PlatformBadge({ platform }: { platform: Platform }) { |
9 | 9 | const icons: Record<Platform, ReactNode> = { |
@@ -103,7 +103,6 @@ export default function PlaybooksSection({ activeDevice, selectedDevice, onSelec |
103 | 103 | const displayedPlaybooks = (showAll || isSearching) ? regularPlaybooks : regularPlaybooks.slice(0, 6); |
104 | 104 |
|
105 | 105 | const isHaloSelected = activeDevice === "reference"; |
106 | | - const isComingSoon = (!!activeDevice && COMING_SOON_CATEGORIES.has(activeDevice)) || (!!selectedDevice && COMING_SOON_DEVICES.has(selectedDevice)); |
107 | 106 | const playbookHref = (id: string) => { |
108 | 107 | const params = new URLSearchParams(); |
109 | 108 | if (activeDevice && activeDevice !== "all") params.set("category", activeDevice); |
@@ -159,13 +158,6 @@ export default function PlaybooksSection({ activeDevice, selectedDevice, onSelec |
159 | 158 | }`} |
160 | 159 | > |
161 | 160 | {catInfo?.deviceDisplayNames?.[d] ?? deviceNames[d]} |
162 | | - {COMING_SOON_DEVICES.has(d) && ( |
163 | | - <span className={`text-[9px] font-medium tracking-wide ${ |
164 | | - selectedDevice === d ? "text-black/50" : "text-[#D4915D]/70" |
165 | | - }`}> |
166 | | - Soon |
167 | | - </span> |
168 | | - )} |
169 | 161 | </button> |
170 | 162 | ))} |
171 | 163 | <span className="text-[#333] text-xs select-none">|</span> |
@@ -250,17 +242,10 @@ export default function PlaybooksSection({ activeDevice, selectedDevice, onSelec |
250 | 242 | <> |
251 | 243 | {/* Featured Playbook - Hero Style */} |
252 | 244 | {featuredPlaybook && ( |
253 | | - <Link href={isComingSoon ? "#" : playbookHref(featuredPlaybook.id)} className="block mb-6" onClick={isComingSoon ? (e) => e.preventDefault() : undefined}> |
| 245 | + <Link href={playbookHref(featuredPlaybook.id)} className="block mb-6"> |
254 | 246 | <div className="group relative bg-gradient-to-r from-[#1e1e1e] to-[#242424] border border-[#D4915D]/30 rounded-xl overflow-hidden hover:border-[#D4915D]/60 transition-all duration-300"> |
255 | 247 | <div className="absolute inset-0 bg-gradient-to-r from-[#D4915D]/5 to-transparent" /> |
256 | 248 | <div className="absolute top-0 right-0 w-48 h-48 bg-[#D4915D]/5 rounded-full blur-3xl transform translate-x-1/2 -translate-y-1/2" /> |
257 | | - {isComingSoon && ( |
258 | | - <div className="absolute inset-0 z-10 bg-black/60 backdrop-blur-[2px] flex items-center justify-center rounded-xl"> |
259 | | - <span className="px-4 py-1.5 text-sm font-semibold text-[#D4915D] border border-[#D4915D]/40 rounded-full bg-[#D4915D]/10 tracking-wide"> |
260 | | - Coming Soon |
261 | | - </span> |
262 | | - </div> |
263 | | - )} |
264 | 249 |
|
265 | 250 | <div className="relative p-5 md:p-6 flex flex-col md:flex-row items-start md:items-center gap-4"> |
266 | 251 | <div className="flex-1"> |
@@ -328,15 +313,8 @@ export default function PlaybooksSection({ activeDevice, selectedDevice, onSelec |
328 | 313 | {/* Playbook Grid */} |
329 | 314 | <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3 mb-6"> |
330 | 315 | {displayedPlaybooks.map((playbook) => ( |
331 | | - <Link key={playbook.id} href={isComingSoon ? "#" : playbookHref(playbook.id)} className="block group" onClick={isComingSoon ? (e) => e.preventDefault() : undefined}> |
| 316 | + <Link key={playbook.id} href={playbookHref(playbook.id)} className="block group"> |
332 | 317 | <div className="relative h-full bg-[#1e1e1e] border border-[#333333] rounded-lg p-4 hover:border-[#D4915D]/50 hover:bg-[#242424] transition-all duration-300 overflow-hidden"> |
333 | | - {isComingSoon && ( |
334 | | - <div className="absolute inset-0 z-10 bg-black/60 backdrop-blur-[2px] flex items-center justify-center rounded-lg"> |
335 | | - <span className="px-3 py-1 text-xs font-semibold text-[#D4915D] border border-[#D4915D]/40 rounded-full bg-[#D4915D]/10 tracking-wide"> |
336 | | - Coming Soon |
337 | | - </span> |
338 | | - </div> |
339 | | - )} |
340 | 318 | <div className="flex items-start justify-between mb-3"> |
341 | 319 | <div className="p-1.5 rounded-md bg-[#D4915D]/10 border border-[#D4915D]/20"> |
342 | 320 | <svg className="w-4 h-4 text-[#D4915D]" fill="none" stroke="currentColor" viewBox="0 0 24 24" strokeWidth={1.5}> |
@@ -375,14 +353,12 @@ export default function PlaybooksSection({ activeDevice, selectedDevice, onSelec |
375 | 353 | </span> |
376 | 354 | <DifficultyBadge difficulty={playbook.difficulty} /> |
377 | 355 | </div> |
378 | | - {!isComingSoon && ( |
379 | | - <div className="flex items-center text-xs text-[#D4915D] font-medium opacity-0 group-hover:opacity-100 transition-opacity"> |
380 | | - <span>View</span> |
381 | | - <svg className="w-3 h-3 ml-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
382 | | - <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 5l7 7-7 7" /> |
383 | | - </svg> |
384 | | - </div> |
385 | | - )} |
| 356 | + <div className="flex items-center text-xs text-[#D4915D] font-medium opacity-0 group-hover:opacity-100 transition-opacity"> |
| 357 | + <span>View</span> |
| 358 | + <svg className="w-3 h-3 ml-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
| 359 | + <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 5l7 7-7 7" /> |
| 360 | + </svg> |
| 361 | + </div> |
386 | 362 | </div> |
387 | 363 | </div> |
388 | 364 | </Link> |
|
0 commit comments