From 0ec7743fca089b7456a3aa0e27eea058fe76adcc Mon Sep 17 00:00:00 2001 From: LandaMm Date: Fri, 13 Jun 2025 21:45:39 +0200 Subject: [PATCH] feat: delimiter handling/support --- web/src/components/Home/Sidebar/index.tsx | 31 +++++++++++++++++------ web/src/components/Home/TopBar/index.tsx | 28 ++++++++++---------- 2 files changed, 38 insertions(+), 21 deletions(-) diff --git a/web/src/components/Home/Sidebar/index.tsx b/web/src/components/Home/Sidebar/index.tsx index b68b9bc..dfba9e6 100644 --- a/web/src/components/Home/Sidebar/index.tsx +++ b/web/src/components/Home/Sidebar/index.tsx @@ -7,17 +7,32 @@ const Sidebar: FC = () => { return (
- {barItems.map((item) => ( - + {barItems.map((item, index) => + item.type !== "delimiter" ? ( + +
+ {item.icon} {item.title} +
+ + ) : (
- {item.icon} {item.title} +
+ {typeof item.title === "string" && ( +

+ {item.title} +

+ )} +
- - ))} + ), + )}
); }; diff --git a/web/src/components/Home/TopBar/index.tsx b/web/src/components/Home/TopBar/index.tsx index 97017a1..bcf56b5 100644 --- a/web/src/components/Home/TopBar/index.tsx +++ b/web/src/components/Home/TopBar/index.tsx @@ -7,19 +7,21 @@ const TopBar: FC = () => { return (
- {barItems.map((item) => ( - -
- {item.title} -
- - ))} + {barItems + .filter((item) => item.type !== "delimiter") + .map((item) => ( + +
+ {item.title} +
+ + ))}
); };