From a54bac8584b477e91b58f8a73c4deae82a4275c5 Mon Sep 17 00:00:00 2001 From: Alexandr Zhidovlenko Date: Sun, 9 Jan 2022 21:58:49 +0300 Subject: [PATCH] feat: Set the current story name in the title --- lib/preview-web/src/UrlStore.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/preview-web/src/UrlStore.ts b/lib/preview-web/src/UrlStore.ts index 86437da74e88..0f930edf66fc 100644 --- a/lib/preview-web/src/UrlStore.ts +++ b/lib/preview-web/src/UrlStore.ts @@ -42,6 +42,7 @@ export const setPath = (selection?: Selection) => { if (!selection) return; const query = getQueryString({ selection }); const { hash = '' } = document.location; + document.title = selection.storyId; history.replaceState({}, '', `${document.location.pathname}${query}${hash}`); };