From 3cd2ec93f28084f1960f8783adb9142cf19363d6 Mon Sep 17 00:00:00 2001 From: Srinath Narayanan Date: Tue, 2 Mar 2021 14:19:10 -0800 Subject: [PATCH] fixed notebook viewer bug (#461) --- src/NotebookViewer/NotebookViewer.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/NotebookViewer/NotebookViewer.tsx b/src/NotebookViewer/NotebookViewer.tsx index 050da4903..6af59d062 100644 --- a/src/NotebookViewer/NotebookViewer.tsx +++ b/src/NotebookViewer/NotebookViewer.tsx @@ -11,6 +11,7 @@ import { IGalleryItem, JunoClient } from "../Juno/JunoClient"; import * as GalleryUtils from "../Utils/GalleryUtils"; import { GalleryHeaderComponent } from "../Explorer/Controls/Header/GalleryHeaderComponent"; import { FileSystemUtil } from "../Explorer/Notebook/FileSystemUtil"; +import { GalleryTab } from "../Explorer/Controls/NotebookGallery/GalleryViewerComponent"; const onInit = async () => { initializeIcons(); @@ -21,7 +22,10 @@ const onInit = async () => { let onBackClick: () => void; if (galleryViewerProps.selectedTab !== undefined) { backNavigationText = GalleryUtils.getTabTitle(galleryViewerProps.selectedTab); - onBackClick = () => (window.location.href = `${configContext.hostedExplorerURL}gallery.html`); + onBackClick = () => + (window.location.href = `${configContext.hostedExplorerURL}gallery.html?tab=${ + GalleryTab[galleryViewerProps.selectedTab] + }`); } const hideInputs = notebookViewerProps.hideInputs;