Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): signed-out T3 Connect shows a Sign in button #24636

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 2 commits intomain fromrefs/pull/24636/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 1 changed file with 70 additions and 50 deletions.

x
0 of 1 viewed, 1 left
70 additions and 50 deletionsapps/web/src/components/settings/SavedEnvironmentRows.tsxModified
View file
@@ -48,6 +48,7 @@
supportsServerUpdateThreadContinuation,
} from "~/versionSkew";
import { hasCloudPublicConfig } from "~/cloud/publicConfig";
+import { isElectron } from "~/env";
import { useCloudLinkController } from "~/cloud/useCloudLinkController";
import { environmentCatalog } from "~/connection/catalog";
import { readEnvironmentScope } from "~/state/session";
@@ -65,6 +66,7 @@
ServerUpdateProgress,
} from "../ServerUpdateAction";
import { CloudEnvironmentConnectRows } from "../cloud/CloudEnvironmentConnectList";
+import { useT3ConnectAuthPrompt } from "../clerk/useT3ConnectAuthPrompt";
​
type SavedBackendListRowProps = {
environment: EnvironmentPresentation;
@@ -476,15 +478,29 @@
operationError,
reconcileCloudState,
} = useCloudLinkController();
+ const { openAuthPrompt } = useT3ConnectAuthPrompt();
const [isUpdating, setIsUpdating] = useState(false);
const [isUpdatingPreference, setIsUpdatingPreference] = useState(false);
​
- const disabledReason = !isSignedIn
- ? "Sign in to T3 Connect to manage this environment."
- : !canManageRelay
- ? "Your session does not have permission to manage T3 Connect access."