-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auth improvements and my profile page
- Loading branch information
Showing
17 changed files
with
339 additions
and
89 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,14 @@ | ||
import { useIsAuthReady, useIsLoggedIn } from "~/utils/supabase/AuthProvider"; | ||
import { urls } from "~/utils/urls"; | ||
|
||
import { NavbarItem } from "./NavbarItem"; | ||
import type { NavBarProps } from "./types"; | ||
import { buttonVariants } from "../ui/button"; | ||
|
||
export function MainNav({ items }: NavBarProps) { | ||
const user = useIsLoggedIn(); | ||
const isReady = useIsAuthReady(); | ||
|
||
return ( | ||
<nav className={"items-center space-x-4 lg:space-x-6"}> | ||
<nav className={"flex flex-row items-center gap-1"}> | ||
{items | ||
.filter((item) => item.show) | ||
.map((item) => ( | ||
<NavbarItem key={`navbarItem-${item.content}`} item={item} /> | ||
))} | ||
{isReady && !user ? ( | ||
<a className={buttonVariants({})} href={urls.login}> | ||
Ingresar | ||
</a> | ||
) : null} | ||
</nav> | ||
); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { useMyProfileSuspenseQuery } from "~/components/Profile/graphql/myProfile.generated"; | ||
|
||
export const MyProfile = () => { | ||
const { data } = useMyProfileSuspenseQuery(); | ||
|
||
return ( | ||
<div className="flex flex-col gap-6"> | ||
<div> | ||
<h2 className="text-xl">Información personal</h2> | ||
<div className="flex items-center gap-4"> | ||
<span>Nombre:</span> | ||
<span> | ||
{data.me.name} {data.me.lastName && data.me.lastName} | ||
</span> | ||
</div> | ||
</div> | ||
<div> | ||
<h2 className="text-xl">Información de contacto</h2> | ||
<div className="flex items-center gap-4"> | ||
<span>Email:</span> | ||
<span>{data.me.email}</span> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; |
Oops, something went wrong.