fix: workspace project ids computed (#3417)
This commit is contained in:
parent
577118ca02
commit
4baf2a2f09
2 changed files with 17 additions and 13 deletions
|
|
@ -23,6 +23,8 @@ export const OAuthOptions: React.FC<Props> = observer((props) => {
|
|||
const {
|
||||
config: { envConfig },
|
||||
} = useApplication();
|
||||
// derived values
|
||||
const areBothOAuthEnabled = envConfig?.google_client_id && envConfig?.github_client_id;
|
||||
|
||||
const handleGoogleSignIn = async ({ clientId, credential }: any) => {
|
||||
try {
|
||||
|
|
@ -73,7 +75,7 @@ export const OAuthOptions: React.FC<Props> = observer((props) => {
|
|||
<p className="mx-3 flex-shrink-0 text-center text-sm text-onboarding-text-400">Or continue with</p>
|
||||
<hr className="w-full border-onboarding-border-100" />
|
||||
</div>
|
||||
<div className="mx-auto mt-7 grid grid-cols-2 gap-4 overflow-hidden sm:w-96">
|
||||
<div className={`mx-auto mt-7 grid gap-4 overflow-hidden sm:w-96 ${areBothOAuthEnabled ? "grid-cols-2" : ""}`}>
|
||||
{envConfig?.google_client_id && (
|
||||
<div className="h-[42px] flex items-center !overflow-hidden">
|
||||
<GoogleSignInButton clientId={envConfig?.google_client_id} handleSignIn={handleGoogleSignIn} type={type} />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue