mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2024-11-29 08:56:52 +00:00
Fix Official Samples not loading when Gallery tab is opened (#1282)
This commit is contained in:
parent
c534b2d74b
commit
c731eb9cf9
@ -2,6 +2,7 @@ import { initializeIcons, Link, Text } from "@fluentui/react";
|
|||||||
import "bootstrap/dist/css/bootstrap.css";
|
import "bootstrap/dist/css/bootstrap.css";
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import * as ReactDOM from "react-dom";
|
import * as ReactDOM from "react-dom";
|
||||||
|
import { userContext } from "UserContext";
|
||||||
import { initializeConfiguration } from "../ConfigContext";
|
import { initializeConfiguration } from "../ConfigContext";
|
||||||
import { GalleryHeaderComponent } from "../Explorer/Controls/Header/GalleryHeaderComponent";
|
import { GalleryHeaderComponent } from "../Explorer/Controls/Header/GalleryHeaderComponent";
|
||||||
import {
|
import {
|
||||||
@ -25,7 +26,9 @@ const onInit = async () => {
|
|||||||
|
|
||||||
const props: GalleryAndNotebookViewerComponentProps = {
|
const props: GalleryAndNotebookViewerComponentProps = {
|
||||||
junoClient: new JunoClient(),
|
junoClient: new JunoClient(),
|
||||||
selectedTab: galleryViewerProps.selectedTab || GalleryTab.PublicGallery,
|
selectedTab:
|
||||||
|
galleryViewerProps.selectedTab ||
|
||||||
|
(userContext.features.publicGallery ? GalleryTab.PublicGallery : GalleryTab.OfficialSamples),
|
||||||
sortBy: galleryViewerProps.sortBy || SortBy.MostRecent,
|
sortBy: galleryViewerProps.sortBy || SortBy.MostRecent,
|
||||||
searchText: galleryViewerProps.searchText,
|
searchText: galleryViewerProps.searchText,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user