-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #495 from cornell-dti/matt/less-intrusive-anon-modal
Less intrusive anon modal
- Loading branch information
Showing
6 changed files
with
129 additions
and
131 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import React from 'react'; | ||
import styles from '../Styles/LoginModal.module.css'; | ||
import Emoji from '/login_modal_bear.svg'; | ||
import { useAuthOptionalLogin } from '../../../auth/auth_utils'; | ||
|
||
type Props = { | ||
open: boolean; | ||
}; | ||
|
||
const LoginModal = ({ open }: Props) => { | ||
const { signIn } = useAuthOptionalLogin(); | ||
if (!open) { | ||
return <></>; | ||
} | ||
|
||
/** | ||
* Should only render when the user is not signed in | ||
*/ | ||
return ( | ||
<div className={styles.warningContainer}> | ||
<img | ||
src={Emoji} | ||
className={styles.emoji} | ||
alt="CUReviews Bear -- 'You got this!' emoji" | ||
/> | ||
<div className={styles.message}> | ||
<span className="line1"> | ||
Your review will upload once you login! | ||
<br /> | ||
</span>{' '} | ||
</div> | ||
<button | ||
className={`${styles.button}`} | ||
onClick={() => signIn('profile')} | ||
> | ||
Login | ||
</button> | ||
<div className={styles.pastReviewsMessage}> | ||
You will be redirected to your past reviews page | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default LoginModal; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
border-radius: 8px; | ||
} | ||
|
||
.anonymousLogo { | ||
.emoji { | ||
max-width: 25%; | ||
max-height: 25%; | ||
margin: auto; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters