From d1c9d2741cba773df14ce62cd04bd23924a9ef49 Mon Sep 17 00:00:00 2001 From: John Goh Date: Fri, 18 Mar 2022 15:03:57 +0800 Subject: [PATCH] feat: basic styling for config viewer --- src/pages/config/columns.js | 11 ++- src/pages/config/config-details.js | 10 ++- src/pages/config/config-list.js | 121 +++++++++++++++++++---------- 3 files changed, 95 insertions(+), 47 deletions(-) diff --git a/src/pages/config/columns.js b/src/pages/config/columns.js index c814bf643..136c576b1 100644 --- a/src/pages/config/columns.js +++ b/src/pages/config/columns.js @@ -6,12 +6,15 @@ export function TagsCell({ row, column }) {
{tags?.length > 0 ? ( tags.map((tag) => ( -
+
{tag}
)) ) : ( - no tags + none )}
); @@ -20,8 +23,8 @@ export function TagsCell({ row, column }) { export function DateCell({ row, column }) { const dateString = row?.values[column.id]; return ( -
- {dateString ? dayjs(dateString).format("MMM DD HH:mm") : "None"} +
+ {dateString ? dayjs(dateString).format("h:mm A, DD-MM-YYYY") : "None"}
); } diff --git a/src/pages/config/config-details.js b/src/pages/config/config-details.js index 52a0f6f7b..33de2754c 100644 --- a/src/pages/config/config-details.js +++ b/src/pages/config/config-details.js @@ -2,23 +2,25 @@ import { useNavigate, useParams } from "react-router-dom"; import { SearchLayout } from "../../components/Layout"; import jsonString from "../../data/sampleConfig.json"; +const mockName = "package.json"; // TODO: get actual name from API call + export function ConfigDetailsPage() { const { id } = useParams(); const navigate = useNavigate(); return ( - +