From 61bb02110ccebbbd78119dd490716637ec86419b Mon Sep 17 00:00:00 2001
From: sowgro <tpoke.ferrari@gmail.com>
Date: Wed, 16 Oct 2024 00:02:25 -0400
Subject: Refactor

---
 extension/src/Folder.tsx | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

(limited to 'extension/src/Folder.tsx')

diff --git a/extension/src/Folder.tsx b/extension/src/Folder.tsx
index e831e62..07d56ac 100644
--- a/extension/src/Folder.tsx
+++ b/extension/src/Folder.tsx
@@ -1,14 +1,19 @@
-interface FolderProps {
-    name: string;
-    children?: React.ReactNode;
-}
+import BookmarkTreeNode = chrome.bookmarks.BookmarkTreeNode;
+import Bookmark from "./Bookmark.tsx";
 
-function Folder (props: FolderProps) {
+function Folder (props: {data: BookmarkTreeNode}) {
     return (
         <div className="folder">
-            <span>{props.name}</span>
+            <span>{props.data.title}</span>
             <div>
-                {props.children}
+                {
+                    props.data.children &&
+                    props.data.children.map(child => {
+                        return child.children
+                            ? <Folder data={child} />
+                            : <Bookmark data={child} />
+                    })
+                }
             </div>
         </div>
     )
-- 
cgit v1.2.3

