Web: Management: changed getting params

This commit is contained in:
DmitrySychugov 2023-08-15 20:05:07 +05:00
parent 91d4bc59e5
commit c9a18b0e79
3 changed files with 13 additions and 13 deletions

View File

@ -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);
};

View File

@ -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>

View File

@ -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">