Skip to content

Commit

Permalink
Link splash page buttons to correct pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyfurion committed Dec 2, 2021
1 parent 4dd7d7a commit c87930c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion client/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ body {
vertical-align: center;
}
#splash-menu {
margin-top: 5%;
margin-top: 10%;
}

#credit {
Expand Down
9 changes: 5 additions & 4 deletions client/src/components/HomeWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ export default function HomeWrapper() {
const { auth } = useContext(AuthContext);
console.log("HomeWrapper auth.loggedIn: " + auth.loggedIn);

if (auth.loggedIn)
return <HomeScreen />
else
return <SplashScreen />
if (auth.loggedIn) {
return <HomeScreen />;
} else {
return <SplashScreen />;
}
}
4 changes: 2 additions & 2 deletions client/src/components/LoginScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default function LoginScreen() {

return (
<ThemeProvider theme={theme}>
<Grid container component="main" sx={{ height: '100vh' }}>
<Grid container component="main" sx={{ height: '100%' }}>
<CssBaseline />
<Grid
item
Expand Down Expand Up @@ -113,7 +113,7 @@ export default function LoginScreen() {
</Link>
</Grid>
<Grid item>
<Link href="#" variant="body2">
<Link href="/register/" variant="body2">
{"Don't have an account? Sign Up"}
</Link>
</Grid>
Expand Down
5 changes: 3 additions & 2 deletions client/src/components/SplashScreen.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Link } from 'react-router-dom'
import Button from '@mui/material/Button'
import Stack from '@mui/material/Stack'

Expand All @@ -11,8 +12,8 @@ export default function SplashScreen() {
for the world to see!
</p>
<Stack id="splash-menu" spacing={15} direction="row" justifyContent="center">
<Button variant="contained" style={{width: '20%'}}>Create Account</Button>
<Button variant="contained" style={{width: '20%'}}>Login</Button>
<Button href="/register/" variant="contained" style={{width: '20%'}}>Register</Button>
<Button href="/login/" variant="contained" style={{width: '20%'}}>Login</Button>
<Button variant="contained" style={{width: '20%'}}>Continue as Guest</Button>
</Stack>
<b id="credit">Developed by Patrick Fan, CSE316 Final Project</b>
Expand Down

0 comments on commit c87930c

Please sign in to comment.