Web: Management: changed getting params
This commit is contained in:
parent
91d4bc59e5
commit
c9a18b0e79
@ -17,18 +17,13 @@ const Spaces = () => {
|
||||
|
||||
const { spacesStore, authStore } = useStore();
|
||||
|
||||
const {
|
||||
initStore,
|
||||
isConnected,
|
||||
portals,
|
||||
domainDialogVisible,
|
||||
createPortalDialogVisible,
|
||||
} = spacesStore;
|
||||
const { isConnected, domainDialogVisible, createPortalDialogVisible } =
|
||||
spacesStore;
|
||||
const { setDocumentTitle } = authStore;
|
||||
const { portals } = authStore.settingsStore;
|
||||
|
||||
React.useEffect(() => {
|
||||
const fetchData = async () => {
|
||||
await initStore();
|
||||
setIsLoading(false);
|
||||
};
|
||||
|
||||
|
@ -11,10 +11,15 @@ const ConfigurationSection = ({ t }) => {
|
||||
const [domain, setDomain] = React.useState<string>("");
|
||||
const [name, setName] = React.useState<string>("");
|
||||
|
||||
const { spacesStore } = useStore();
|
||||
const { spacesStore, authStore } = useStore();
|
||||
|
||||
const { validatePortalName, setPortalSettings } = spacesStore;
|
||||
|
||||
const onHandleClick = () => {
|
||||
setPortalSettings(domain, name);
|
||||
authStore.settingsStore.getAllPortals();
|
||||
};
|
||||
|
||||
const onHandleDomain = (e: React.ChangeEvent<HTMLInputElement>) =>
|
||||
setDomain(e.target.value);
|
||||
|
||||
@ -75,7 +80,7 @@ const ConfigurationSection = ({ t }) => {
|
||||
size="normal"
|
||||
className="spaces-button"
|
||||
label={t("Common:Connect")}
|
||||
onClick={() => setPortalSettings(domain, name)}
|
||||
onClick={onHandleClick}
|
||||
primary={true}
|
||||
/>
|
||||
</ConfigurationWrapper>
|
||||
|
@ -7,17 +7,17 @@ import { StyledMultipleSpaces } from "../StyledSpaces";
|
||||
import { useStore } from "SRC_DIR/store";
|
||||
|
||||
const MultipleSpaces = ({ t }) => {
|
||||
const { spacesStore } = useStore();
|
||||
const { spacesStore, authStore } = useStore();
|
||||
|
||||
const {
|
||||
portals,
|
||||
deletePortal,
|
||||
domain,
|
||||
setPortalName,
|
||||
setChangeDomainDialogVisible,
|
||||
setCreatePortalDialogVisible,
|
||||
} = spacesStore;
|
||||
|
||||
const { portals, domain } = authStore.settingsStore;
|
||||
|
||||
return (
|
||||
<StyledMultipleSpaces>
|
||||
<div className="multiple-spaces-section">
|
||||
|
Loading…
Reference in New Issue
Block a user