|
@@ -13,7 +13,6 @@ import Helper from "components/form-components/Helper";
|
|
|
import TabSelector from "components/TabSelector";
|
|
import TabSelector from "components/TabSelector";
|
|
|
|
|
|
|
|
interface GithubAppAccessData {
|
|
interface GithubAppAccessData {
|
|
|
- has_access: boolean;
|
|
|
|
|
username?: string;
|
|
username?: string;
|
|
|
accounts?: string[];
|
|
accounts?: string[];
|
|
|
}
|
|
}
|
|
@@ -24,9 +23,8 @@ const AccountSettingsModal = () => {
|
|
|
const { setCurrentModal } = useContext(Context);
|
|
const { setCurrentModal } = useContext(Context);
|
|
|
const [accessLoading, setAccessLoading] = useState(true);
|
|
const [accessLoading, setAccessLoading] = useState(true);
|
|
|
const [accessError, setAccessError] = useState(false);
|
|
const [accessError, setAccessError] = useState(false);
|
|
|
- const [accessData, setAccessData] = useState<GithubAppAccessData>({
|
|
|
|
|
- has_access: false,
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ const [accessData, setAccessData] = useState<GithubAppAccessData>({});
|
|
|
|
|
+
|
|
|
const [currentTab, setCurrentTab] = useState("integrations");
|
|
const [currentTab, setCurrentTab] = useState("integrations");
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
@@ -72,7 +70,7 @@ const AccountSettingsModal = () => {
|
|
|
) : (
|
|
) : (
|
|
|
<>
|
|
<>
|
|
|
{/* Will be styled (and show what account is connected) later */}
|
|
{/* Will be styled (and show what account is connected) later */}
|
|
|
- {accessData.has_access ? (
|
|
|
|
|
|
|
+ {accessData.accounts?.length > 0 ? (
|
|
|
<Placeholder>
|
|
<Placeholder>
|
|
|
<User>
|
|
<User>
|
|
|
You are currently authorized as <B>{accessData.username}</B> and
|
|
You are currently authorized as <B>{accessData.username}</B> and
|