From 02064833bbde779783ae1bfc72f8adaea70eefd7 Mon Sep 17 00:00:00 2001 From: atanasster Date: Tue, 7 Jul 2020 10:55:51 -0400 Subject: [PATCH] fix: page title split --- ui/app/src/App/App.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/app/src/App/App.tsx b/ui/app/src/App/App.tsx index bd1fffd1d..3bec455ff 100644 --- a/ui/app/src/App/App.tsx +++ b/ui/app/src/App/App.tsx @@ -18,7 +18,7 @@ export interface AppProps { * application container component. adds SEO, SkipLinks, Header and Footer. * */ -export const App: FC = ({ title, children }) => { +export const App: FC = ({ title = '', children }) => { const { storeProvider, docId } = useContext(BlockContext); const doc = docId ? storeProvider.getStoryDoc(docId) : undefined; const { toolbar } = storeProvider.config || {}; @@ -38,10 +38,11 @@ export const App: FC = ({ title, children }) => { text: 'skip to context sidebar', }); } - + const titleParts = title.split('/'); + const pageTitle = titleParts[titleParts.length - 1]; return ( - +