refactor: temporarily remove withI18n from GoogleLoginButton for debugging and enhance error handling in LoginComponent

This commit is contained in:
sebseb7
2025-07-30 15:34:23 +02:00
parent 4584da1199
commit afcdbb29c9
2 changed files with 36 additions and 23 deletions

View File

@@ -2,7 +2,7 @@ import React, { Component } from 'react';
import Button from '@mui/material/Button';
import GoogleIcon from '@mui/icons-material/Google';
import GoogleAuthContext from '../contexts/GoogleAuthContext.js';
import { withI18n } from '../i18n/index.js';
// import { withI18n } from '../i18n/withTranslation.js'; // Temporarily commented out for debugging
class GoogleLoginButton extends Component {
static contextType = GoogleAuthContext;
@@ -191,13 +191,16 @@ class GoogleLoginButton extends Component {
const { isInitializing, isPrompting } = this.state;
const isLoading = isInitializing || isPrompting || (this.context && !this.context.isLoaded);
return (
<Button
variant="contained"
startIcon={<GoogleIcon />}
onClick={this.handleClick}
disabled={disabled || isLoading}
style={{ backgroundColor: '#4285F4', color: 'white', ...style }}
fullWidth
style={{backgroundColor: '#4285F4', color: 'white', ...style }}
className={className}
>
{isLoading ? 'Loading...' : text}
@@ -206,4 +209,4 @@ class GoogleLoginButton extends Component {
}
}
export default withI18n(GoogleLoginButton);
export default GoogleLoginButton; // Temporarily removed withI18n for debugging