From 5f58260a7602494f21969fd917a0a984ae9d714d Mon Sep 17 00:00:00 2001
From: Pinapelz <yukais@pinapelz.com>
Date: Wed, 26 Jun 2024 21:55:22 -0700
Subject: add historical milestone table to channel pages

---
 src/components/CompactTable/CompactTable.tsx | 39 +++++++++++++++++++++++-----
 1 file changed, 33 insertions(+), 6 deletions(-)

(limited to 'src/components/CompactTable/CompactTable.tsx')

diff --git a/src/components/CompactTable/CompactTable.tsx b/src/components/CompactTable/CompactTable.tsx
index 153d5ea..64eb4f2 100644
--- a/src/components/CompactTable/CompactTable.tsx
+++ b/src/components/CompactTable/CompactTable.tsx
@@ -1,9 +1,36 @@
-interface CompactTableProps{
-    subs: number[];
-    milestone: string[];
-  }
+import React from 'react';
 
-const CompactTable = (props: CompactTableProps) => {
+interface CompactTableProps {
+  tableData: {
+    dates: string[];
+    milestones: string[];
+  }
 
 }
-export default CompactTable;
\ No newline at end of file
+
+const CompactTable: React.FC<CompactTableProps> = ({ tableData }) => {
+  return (
+    <div className="max-w-full mx-auto bg-gray-100 shadow-md rounded-lg overflow-hidden">
+      <div className="flex gap-x-4">
+        <div className="w-1/2 px-4 py-5">
+          <h2 className="text-lg font-semibold text-gray-900">Dates</h2>
+          <ul className="mt-3">
+            {tableData.dates.map((date, index) => (
+              <li key={index} className="text-gray-700 text-sm py-1 border-b border-gray-200">{date}</li>
+            ))}
+          </ul>
+        </div>
+        <div className="w-1/2 px-4 py-5">
+          <h2 className="text-lg font-semibold text-gray-900">Milestones</h2>
+          <ul className="mt-3">
+            {tableData.milestones.map((milestone, index) => (
+              <li key={index} className="text-gray-700 text-sm py-1 border-b border-gray-200">{milestone.toLocaleString()}</li>
+            ))}
+          </ul>
+        </div>
+      </div>
+    </div>
+  );
+};
+
+export default CompactTable;
-- 
cgit v1.2.3

