import React, { useEffect, useState } from "react"; import { useRouteMatch, useLocation, useParams, Link, Route, } from "react-router-dom"; import { getCurrentOrg } from "selectors/organizationSelectors"; import { useSelector, useDispatch } from "react-redux"; import { TabComponent, TabProp } from "components/ads/Tabs"; import Text, { TextType } from "components/ads/Text"; import history from "utils/history"; import styled from "styled-components"; import MemberSettings from "./Members"; import IconComponent from "components/designSystems/appsmith/IconComponent"; import { GeneralSettings } from "./General"; import * as Sentry from "@sentry/react"; import { getAllApplications } from "actions/applicationActions"; const SentryRoute = Sentry.withSentryRouting(Route); const LinkToApplications = styled(Link)` margin-top: 30px; margin-bottom: 35px; display: inline-block; width: auto; &:hover { text-decoration: none; } svg { cursor: pointer; } `; const SettingsWrapper = styled.div` width: ${(props) => props.theme.pageContentWidth}px; margin: 0 auto; `; export default function Settings() { const { orgId } = useParams<{ orgId: string }>(); const currentOrg = useSelector(getCurrentOrg).filter( (el) => el.id === orgId, )[0]; const { path } = useRouteMatch(); const location = useLocation(); const dispatch = useDispatch(); useEffect(() => { if (!currentOrg) { dispatch(getAllApplications()); } }, [dispatch, currentOrg]); const SettingsRenderer = (