basic OwnProfile page

This commit is contained in:
2022-12-28 17:06:37 +01:00
parent d1feca9544
commit bb5059a5db
2 changed files with 57 additions and 0 deletions

43
pages/ja.tsx Normal file
View File

@@ -0,0 +1,43 @@
import styles from "../styles/Ja.module.scss";
import { useUser } from "@auth0/nextjs-auth0/client";
const PageMe = () => {
const { user, isLoading } = useUser();
return (
<>
{isLoading && (
<main>
<p>Data is being fetched...</p>
</main>
)}
{user && (
<main>
<div className={styles.header}>
<img src={user.picture || ""} alt={`${user.name}'s picture`} />
<h1>{user.name}</h1>
</div>
{/* <p>
mail: {user.email || "no mail"} <br />
mail verified: {user.email_verified || "no mail verified"} <br />
name: {user.name || "no name"} <br />
nickname: {user.nickname || "no nickname"} <br />
org id: {user.org_id || "no org id"} <br />
picture: {user.picture || "no picture"} <br />
sub: {user.sub || "no sub"} <br />
updated at: {user.updated_at || "no updated at"}
</p> */}
</main>
)}
{!user && (
<main>
<h1>/ja</h1>
<p>
Musisz być zalogowany aby skorzystać z funkcjonalności tej strony.
</p>
</main>
)}
</>
);
};
export default PageMe;

14
styles/Ja.module.scss Normal file
View File

@@ -0,0 +1,14 @@
.header {
margin: 2rem 0;
display: flex;
flex-direction: row;
align-items: center;
gap: 1rem;
img {
height: 69px;
border-radius: 50%;
}
h1 {
font-size: 2rem;
}
}