SupportView.tsx 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. import React, { useState } from "react";
  2. import { Link } from "react-router-dom";
  3. const SupportView: React.FC = () => {
  4. const [activeItem, setActiveItem] = useState("What is travel eSIM/SIM?");
  5. const categories = [
  6. {
  7. title: "What is travel eSIM/SIM?",
  8. count: 3,
  9. icon: (
  10. <svg
  11. className="w-6 h-6"
  12. fill="none"
  13. stroke="currentColor"
  14. viewBox="0 0 24 24"
  15. >
  16. <path
  17. strokeLinecap="round"
  18. strokeLinejoin="round"
  19. strokeWidth={2}
  20. d="M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 00-3 3z"
  21. />
  22. </svg>
  23. ),
  24. items: [
  25. "What is travel eSIM/SIM",
  26. "Physical travel SIM",
  27. "How to buy travel eSIM/SIM",
  28. ],
  29. color: "bg-red-500",
  30. },
  31. {
  32. title: "eSIM installation and activation",
  33. count: 3,
  34. icon: (
  35. <svg
  36. className="w-6 h-6"
  37. fill="none"
  38. stroke="currentColor"
  39. viewBox="0 0 24 24"
  40. >
  41. <path
  42. strokeLinecap="round"
  43. strokeLinejoin="round"
  44. strokeWidth={2}
  45. d="M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"
  46. />
  47. </svg>
  48. ),
  49. items: [
  50. "Email and eSIM QR code",
  51. "Installation guide for iPhone (iOS)",
  52. "Installation guide for Android",
  53. ],
  54. color: "bg-red-600",
  55. },
  56. ];
  57. return (
  58. <div className="bg-white min-h-screen">
  59. <div className="max-w-7xl mx-auto px-4 py-6">
  60. <nav className="flex items-center space-x-2 text-sm text-slate-500 font-medium">
  61. <Link to="/" className="hover:text-[#EE0434] text-[18px]">
  62. Home
  63. </Link>
  64. <svg
  65. className="w-4 h-4"
  66. fill="none"
  67. stroke="currentColor"
  68. viewBox="0 0 24 24"
  69. >
  70. <path
  71. d="M9 5l7 7-7 7"
  72. strokeWidth={2}
  73. strokeLinecap="round"
  74. strokeLinejoin="round"
  75. />
  76. </svg>
  77. <span className="text-slate-900 font-bold text-[18px]">Support</span>
  78. </nav>
  79. </div>
  80. <div className="max-w-7xl mx-auto px-4 pb-20">
  81. <div className="grid grid-cols-1 lg:grid-cols-12 gap-12">
  82. <aside className="lg:col-span-4 space-y-8">
  83. {categories.map((cat, idx) => (
  84. <div key={idx} className="space-y-4">
  85. <div className="flex items-center space-x-4">
  86. <div
  87. className={`w-10 h-10 rounded-xl ${cat.color} flex items-center justify-center text-white shadow-md`}
  88. >
  89. {cat.icon}
  90. </div>
  91. <h3 className="text-[17px] font-black text-[#EE0434] leading-tight">
  92. {cat.title}
  93. </h3>
  94. </div>
  95. <div className="pl-5 border-l-2 border-slate-50 space-y-4 ml-5">
  96. {cat.items.map((item, i) => (
  97. <button
  98. key={i}
  99. onClick={() => setActiveItem(item)}
  100. className="group flex items-center justify-between w-full text-left relative"
  101. >
  102. <div
  103. className={`absolute -left-[22px] w-2 h-2 rounded-full border-2 border-white ${
  104. activeItem === item
  105. ? "bg-[#EE0434] scale-125"
  106. : "bg-slate-200"
  107. }`}
  108. ></div>
  109. <span
  110. className={`text-[14px] font-bold transition-colors pl-4 ${
  111. activeItem === item
  112. ? "text-[#EE0434]"
  113. : "text-slate-500 group-hover:text-[#EE0434]"
  114. }`}
  115. >
  116. {item}
  117. </span>
  118. </button>
  119. ))}
  120. </div>
  121. </div>
  122. ))}
  123. </aside>
  124. <main className="lg:col-span-8">
  125. <h1 className="text-4xl md:text-5xl font-black text-[#EE0434] mb-10">
  126. Guide & Help
  127. </h1>
  128. <p className="text-lg leading-relaxed text-slate-600">
  129. Select a topic from the left to view detailed instructions for
  130. your travel SIM or eSIM. Our support team is also available 24/7
  131. via chat.
  132. </p>
  133. </main>
  134. </div>
  135. </div>
  136. </div>
  137. );
  138. };
  139. export default SupportView;