From 91491a3db37950fedfe822114987264b8f46a002 Mon Sep 17 00:00:00 2001 From: lifeparticle Date: Wed, 25 Oct 2023 21:38:02 +1100 Subject: [PATCH] beam refactor --- ui/src/components/Hoc/withPageTitle/utils/hooks.ts | 2 +- ui/src/components/Hoc/withPageTitle/withPageTitle.tsx | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/src/components/Hoc/withPageTitle/utils/hooks.ts b/ui/src/components/Hoc/withPageTitle/utils/hooks.ts index 921d762f..ab39451a 100644 --- a/ui/src/components/Hoc/withPageTitle/utils/hooks.ts +++ b/ui/src/components/Hoc/withPageTitle/utils/hooks.ts @@ -16,7 +16,7 @@ const usePageTitle = () => { title, description, helpObject: HELP[id] || {}, - beamObject: BEAM[id], + beamObject: BEAM[id] || {}, url: `https://binarytree.dev${pathname}`, }; }; diff --git a/ui/src/components/Hoc/withPageTitle/withPageTitle.tsx b/ui/src/components/Hoc/withPageTitle/withPageTitle.tsx index 09d19ca9..e013ef18 100644 --- a/ui/src/components/Hoc/withPageTitle/withPageTitle.tsx +++ b/ui/src/components/Hoc/withPageTitle/withPageTitle.tsx @@ -54,7 +54,9 @@ const withPageTitle = ( )} - + {beamObject.length > 0 && ( + + )}