From 7263f991daf061db2cd7f4b96e921cb75520ebaa Mon Sep 17 00:00:00 2001 From: Ronny Haase Date: Sun, 22 Oct 2023 13:41:40 +0200 Subject: [PATCH] Fix hub --- .../common/components/tree/DynamicTree.tsx | 18 +- packages/app/src/hub/HubApp.tsx | 243 +++++++++--------- packages/app/src/locking/LockingApp.tsx | 2 +- 3 files changed, 137 insertions(+), 126 deletions(-) diff --git a/packages/app/src/common/components/tree/DynamicTree.tsx b/packages/app/src/common/components/tree/DynamicTree.tsx index e7e07d3d..76690c37 100644 --- a/packages/app/src/common/components/tree/DynamicTree.tsx +++ b/packages/app/src/common/components/tree/DynamicTree.tsx @@ -71,12 +71,20 @@ const width = (index: number, total: number): string => { }; export const DynamicTree: FC<{ + className?: string; details: TreeComponent; - style?: CSSProperties; + islandHeight?: number; onClick?: () => void; - className?: string; + style?: CSSProperties; variant?: "sm" | "md"; -}> = ({ details, style = {}, onClick, className = "", variant = "md" }) => { +}> = ({ + className = "", + details, + islandHeight = 300, + onClick, + style = {}, + variant = "md", +}) => { const { level, species } = details.metadata.type; const treeImages = []; @@ -119,8 +127,8 @@ export const DynamicTree: FC<{ {components} diff --git a/packages/app/src/hub/HubApp.tsx b/packages/app/src/hub/HubApp.tsx index 8403981f..c3c8a7d0 100644 --- a/packages/app/src/hub/HubApp.tsx +++ b/packages/app/src/hub/HubApp.tsx @@ -128,105 +128,39 @@ const _HubApp: ForwardRefRenderFunction< return (
- - { - updateIntroLeft(false); - }} - onLeft={() => { - updateIntroLeft(true); - }} - /> -
-
- -
- - Forest -
-
- {myTree && ( - { - updateShowHubNav(!showHubNav); - }} - /> - )} - -
- Grow - -
-
-
-
- {myTree?.metadata?.type?.level !== undefined && - myTree?.metadata?.type?.level > 0 ? ( -
+ + { + updateIntroLeft(false); + }} + onLeft={() => { + updateIntroLeft(true); + }} + /> +
+
+ - - - -
- ) : ( -
- - - -
- )} -
-
Forest
- -
+ {myTree && ( + { + updateShowHubNav(!showHubNav); + }} + /> + )} + +
Grow
-
+ {myTree?.metadata?.type?.level !== undefined && + myTree?.metadata?.type?.level > 0 ? ( +
+ + + +
+ ) : ( +
+ + + +
)} - > - -
- Lock -
-
- -
- +
+ + Forest +
+
+ +
+ Grow + +
+
+
+
-
- Referral -
-
- - + +
+ Lock +
+
+ +
+ +
+ Referral +
+
+ +
+
diff --git a/packages/app/src/locking/LockingApp.tsx b/packages/app/src/locking/LockingApp.tsx index d438a2e1..1702cc61 100644 --- a/packages/app/src/locking/LockingApp.tsx +++ b/packages/app/src/locking/LockingApp.tsx @@ -181,7 +181,7 @@ const _LockingApp: ForwardRefRenderFunction<
{myTree && details?.impactNFTDetails === undefined && ( - + )} {details?.lockDetails === undefined && (