Skip to content

Commit

Permalink
made login screen
Browse files Browse the repository at this point in the history
  • Loading branch information
OmSingh5092 committed Oct 5, 2020
1 parent b75e6c9 commit 6aba9a4
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 13 deletions.
15 changes: 9 additions & 6 deletions Frontend/src/app/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function LoadingScreen(props){

return(
<div>

Loading...
</div>
)
}
Expand All @@ -17,22 +17,25 @@ function LoadingScreen(props){

function Main(props){

const [scriptLoading, setScriptLoading] = React.useState(false);
const [scriptLoading, setScriptLoading] = React.useState(true);

useEffect(()=>{
const googleSigninScript = document.createElement('script');
googleSigninScript.src = "https://apis.google.com/js/platform.js";
googleSigninScript.onload = ()=>{};
googleSigninScript.onload = ()=>{setScriptLoading(false)};
document.body.append(googleSigninScript);
},[1])


return (
<div>

{scriptLoading?<LoadingScreen/>:
<HashRouter>
<Route exact path= "/" component={(LoginScreen)}/>

</HashRouter>

</HashRouter>}


</div>
)
}
Expand Down
43 changes: 36 additions & 7 deletions Frontend/src/app/components/screens/LoginScreen.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,45 @@
import React from 'react'

import {Button} from '@material-ui/core'
import './style.css';

function LoginScreen(props){

return(<div>
<Button>
Sign in as interviewer
</Button>
<Button>
Join interview room
</Button>
return(<div className="body">

<div style={{
fontSize:50,
fontFamily:"Roboto-Black",
textAlign:"center"
}}>
Welcome! to CodeView
</div><br/>

<div style={{
textAlign:"center"
}}>
Best online solution for taking coding interviews.
</div>

<div style={{
flexGrow:1,
flexDirection:"row",
alignContent:"center",
margin:"auto",
marginTop:40
}}>
<Button color="primary" variant="contained" style={{
margin:20
}}>
Sign in as interviewer
</Button>
<Button color="secondary" variant="contained" style={{
margin:20
}}>
Join interview room
</Button>
</div>

</div>)
}

Expand Down
6 changes: 6 additions & 0 deletions Frontend/src/app/components/screens/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.body{
font-family: "Roboto-Medium";
display: flex;
flex-grow: 1;
flex-direction: column;
}

0 comments on commit 6aba9a4

Please sign in to comment.