-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6bef4ce
commit 43b54ea
Showing
18 changed files
with
418 additions
and
76 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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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 |
---|---|---|
@@ -1,23 +1,32 @@ | ||
|
||
import { useRouter } from 'next/dist/client/router'; | ||
import { useAuth } from '../../hooks/useAuth'; | ||
import useChallenge from '../../hooks/useChallenge'; | ||
import styles from './Profile.module.scss'; | ||
|
||
|
||
export default function Profile(){ | ||
const { level } = useChallenge(); | ||
const { user } = useAuth(); | ||
const { user, name } = useAuth(); | ||
const router = useRouter(); | ||
|
||
return( | ||
<div className={styles.profileContainer}> | ||
<img src={user? user.avatar: 'icons/avatar.svg'} alt={user? user.name: 'avatar'} /> | ||
<img src={user? user.avatar: 'icons/avatar.svg'} alt={user? user.name: name? name:'Player 404'} /> | ||
<div> | ||
<strong>{user? user.name:'Player 1'}</strong> | ||
<strong>{user? user.name: name? name:'Player 404'}</strong> | ||
<p> | ||
<img src="icons/Up.svg" alt="Up" /> | ||
Level {level} | ||
</p> | ||
</div> | ||
|
||
{!user && | ||
<div onClick={()=>router.push('/login')} className={styles.githubButton} title="Login ou Mudar nome do usuário"> | ||
<img src="icons/github-icon.svg" alt="github" /> | ||
<p>Login</p> | ||
</div> | ||
} | ||
</div> | ||
); | ||
} |
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
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
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
Oops, something went wrong.
43b54ea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: