mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-22 02:11:29 +00:00
Remove 'explorer' from a few Panes (#650)
While working on #549 I realized there were a few places where 'explorer' was only needed to expand the notifications console, so I stripped those out where it was easy.
This commit is contained in:
@@ -2,10 +2,9 @@ import { shallow } from "enzyme";
|
||||
import React from "react";
|
||||
import { DatabaseAccount } from "../../../Contracts/DataModels";
|
||||
import { updateUserContext } from "../../../UserContext";
|
||||
import Explorer from "../../Explorer";
|
||||
import { SettingsPane } from "./SettingsPane";
|
||||
const props = {
|
||||
explorer: new Explorer(),
|
||||
expandConsole: (): void => undefined,
|
||||
closePanel: (): void => undefined,
|
||||
};
|
||||
describe("Settings Pane", () => {
|
||||
|
||||
@@ -7,19 +7,18 @@ import { LocalStorageUtility, StorageKey } from "../../../Shared/StorageUtility"
|
||||
import * as StringUtility from "../../../Shared/StringUtility";
|
||||
import { userContext } from "../../../UserContext";
|
||||
import { logConsoleInfo } from "../../../Utils/NotificationConsoleUtils";
|
||||
import Explorer from "../../Explorer";
|
||||
import {
|
||||
GenericRightPaneComponent,
|
||||
GenericRightPaneProps,
|
||||
} from "../GenericRightPaneComponent/GenericRightPaneComponent";
|
||||
|
||||
export interface SettingsPaneProps {
|
||||
explorer: Explorer;
|
||||
expandConsole: () => void;
|
||||
closePanel: () => void;
|
||||
}
|
||||
|
||||
export const SettingsPane: FunctionComponent<SettingsPaneProps> = ({
|
||||
explorer: container,
|
||||
expandConsole,
|
||||
closePanel,
|
||||
}: SettingsPaneProps) => {
|
||||
const [formErrors, setFormErrors] = useState<string>("");
|
||||
@@ -107,7 +106,7 @@ export const SettingsPane: FunctionComponent<SettingsPaneProps> = ({
|
||||
};
|
||||
|
||||
const genericPaneProps: GenericRightPaneProps = {
|
||||
container,
|
||||
expandConsole,
|
||||
formError: formErrors,
|
||||
formErrorDetail: "",
|
||||
id: "settingspane",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user