Skip to content

Commit

Permalink
beam refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
lifeparticle committed Oct 25, 2023
1 parent 06423d7 commit 91491a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/src/components/Hoc/withPageTitle/utils/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const usePageTitle = () => {
title,
description,
helpObject: HELP[id] || {},
beamObject: BEAM[id],
beamObject: BEAM[id] || {},
url: `https://binarytree.dev${pathname}`,
};
};
Expand Down
4 changes: 3 additions & 1 deletion ui/src/components/Hoc/withPageTitle/withPageTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ const withPageTitle = <T extends object>(
)}
</ErrorBoundary>
<ErrorBoundary FallbackComponent={FallbackComponent}>
<Beam beamObject={beamObject} />
{beamObject.length > 0 && (
<Beam beamObject={beamObject} />
)}
<WrappedComponent {...props} />
</ErrorBoundary>
</div>
Expand Down

0 comments on commit 91491a3

Please sign in to comment.