Skip to content

Commit

Permalink
Google Login functionality halted temporaly
Browse files Browse the repository at this point in the history
  • Loading branch information
UO287741 committed Feb 28, 2024
1 parent 0ea5e47 commit e1b0162
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 34 deletions.
19 changes: 0 additions & 19 deletions webapp/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"i18next": "^23.10.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-google-login": "^5.2.2",
"react-i18next": "^14.0.5",
"react-scripts": "^5.0.1",
"web-vitals": "^3.5.1"
Expand Down
14 changes: 7 additions & 7 deletions webapp/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import Container from '@mui/material/Container';
import Typography from '@mui/material/Typography';
import Init from './components/Init';
import './i18n';
import GoogleLoginMenu from './components/GoogleLoginMenu';
/* import GoogleLoginMenu from './components/GoogleLoginMenu'; */

function App() {
const { t } = useTranslation()
const [showGoogleLM, setShowGoogleLM] = useState(false);
// const [showGoogleLM, setShowGoogleLM] = useState(false);
const [showLogin, setShowLogin] = useState(true);
const [showInit, setShowInit] = useState(true);

Expand All @@ -24,10 +24,10 @@ function App() {
state? handleToggleView(state) : handleToggleView(false)
};

const handleGoogleViewChange = () => {
/* const handleGoogleViewChange = () => {
setShowGoogleLM(!showGoogleLM);
setShowInit(!showInit);
}
} */

return (
<Container component="main" maxWidth="xs">
Expand All @@ -37,9 +37,9 @@ function App() {
</Typography>

{showInit ?
<Init changeView={handleLoginRegisterToggleView} changeGoogleView={handleGoogleViewChange} />
: showGoogleLM ?
<GoogleLoginMenu goBack={handleGoogleViewChange} />
<Init changeView={handleLoginRegisterToggleView}/* changeGoogleView={handleGoogleViewChange} */ />
/* : showGoogleLM ?
<GoogleLoginMenu goBack={handleGoogleViewChange} /> */
: showLogin ?
<Login goBack={handleLoginRegisterToggleView} />
: <AddUser goBack={handleLoginRegisterToggleView} />}
Expand Down
4 changes: 2 additions & 2 deletions webapp/src/components/GLoginButton.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import GoogleLogin from "react-google-login";
/* import GoogleLogin from "react-google-login";
import { useTranslation } from 'react-i18next';
Expand Down Expand Up @@ -47,4 +47,4 @@ const GLoginButton = () => {
)
}
export default GLoginButton;
export default GLoginButton; */
4 changes: 2 additions & 2 deletions webapp/src/components/GoogleLoginMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import { Container} from '@mui/material';
/* import { Container} from '@mui/material';
import { useTranslation } from 'react-i18next';
import GLoginButton from './GLoginButton';
Expand Down Expand Up @@ -35,4 +35,4 @@ const GoogleLogin = (props: ActionProps) => {
}
export default GoogleLogin;
export default GoogleLogin; */
6 changes: 3 additions & 3 deletions webapp/src/components/Init.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useTranslation } from 'react-i18next';

type ActionProps = {
changeView:(arg:boolean)=> void;
changeGoogleView:()=> void;
/* changeGoogleView:()=> void; */
}

const Init = (props:ActionProps) =>{
Expand All @@ -17,10 +17,10 @@ const Init = (props:ActionProps) =>{
onClick={() => props.changeView(true)}>
{t('login')}
</button>
<button className={'app-button'}
{/* <button className={'app-button'}
onClick={props.changeGoogleView}>
{t('login_google')}
</button>
</button> */}
</div>
);
};
Expand Down

0 comments on commit e1b0162

Please sign in to comment.